Search in sources :

Example 1 with SubProduct

use of fixtures.lro.models.SubProduct in project autorest.java by Azure.

the class LROsImpl method putSubResourceWithServiceResponseAsync.

/**
 * Long running put request with sub resource.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<SubProduct>> putSubResourceWithServiceResponseAsync() {
    final SubProduct product = null;
    Observable<Response<ResponseBody>> observable = service.putSubResource(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<SubProduct>() {
    }.getType());
}
Also used : SubProduct(fixtures.lro.models.SubProduct) Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken)

Example 2 with SubProduct

use of fixtures.lro.models.SubProduct in project autorest.java by Azure.

the class LROsImpl method putAsyncSubResourceWithServiceResponseAsync.

/**
 * Long running put request with sub resource.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<SubProduct>> putAsyncSubResourceWithServiceResponseAsync() {
    final SubProduct product = null;
    Observable<Response<ResponseBody>> observable = service.putAsyncSubResource(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<SubProduct>() {
    }.getType());
}
Also used : SubProduct(fixtures.lro.models.SubProduct) Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken)

Aggregations

TypeToken (com.google.common.reflect.TypeToken)2 ServiceResponse (com.microsoft.rest.ServiceResponse)2 SubProduct (fixtures.lro.models.SubProduct)2 Response (retrofit2.Response)2