Search in sources :

Example 11 with Product

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

the class LROSADsImpl method postAsyncRelativeRetryNoPayloadWithServiceResponseAsync.

/**
 * Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeaders>> postAsyncRelativeRetryNoPayloadWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.postAsyncRelativeRetryNoPayload(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken<Void>() {
    }.getType(), LROSADsPostAsyncRelativeRetryNoPayloadHeaders.class);
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken) Product(fixtures.lro.models.Product)

Example 12 with Product

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

the class LROSADsImpl method put200InvalidJsonWithServiceResponseAsync.

/**
 * Long running put request, service returns a 200 to the initial request, with an entity that is not a valid json.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<Product>> put200InvalidJsonWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.put200InvalidJson(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<Product>() {
    }.getType());
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken) Product(fixtures.lro.models.Product)

Example 13 with Product

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

the class LROSADsImpl method putNonRetry400WithServiceResponseAsync.

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

Example 14 with Product

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

the class LROsImpl method put201CreatingFailed200WithServiceResponseAsync.

/**
 * Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’.  Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<Product>> put201CreatingFailed200WithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.put201CreatingFailed200(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<Product>() {
    }.getType());
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken) Product(fixtures.lro.models.Product) SubProduct(fixtures.lro.models.SubProduct)

Example 15 with Product

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

the class LROsImpl method post202Retry200WithServiceResponseAsync.

/**
 * Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers>> post202Retry200WithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.post202Retry200(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken<Void>() {
    }.getType(), LROsPost202Retry200Headers.class);
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) TypeToken(com.google.common.reflect.TypeToken) Product(fixtures.lro.models.Product) SubProduct(fixtures.lro.models.SubProduct)

Aggregations

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