Search in sources :

Example 41 with Product

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

the class LROsImpl method put200SucceededNoStateWithServiceResponseAsync.

/**
 * Long running put request, service returns a 200 to the initial request, with an entity that does not contain ProvisioningState=’Succeeded’.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<Product>> put200SucceededNoStateWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.put200SucceededNoState(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 42 with Product

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

the class LROsImpl method postAsyncRetrycanceledWithServiceResponseAsync.

/**
 * 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, LROsPostAsyncRetrycanceledHeaders>> postAsyncRetrycanceledWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.postAsyncRetrycanceled(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken<Void>() {
    }.getType(), LROsPostAsyncRetrycanceledHeaders.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)

Example 43 with Product

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

the class LROsImpl method put201CreatingSucceeded200WithServiceResponseAsync.

/**
 * Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’.  Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<Product>> put201CreatingSucceeded200WithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.put201CreatingSucceeded200(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 44 with Product

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

the class LROsImpl method putAsyncRetryFailedWithServiceResponseAsync.

/**
 * Long running put request, service returns a 200 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<Product, LROsPutAsyncRetryFailedHeaders>> putAsyncRetryFailedWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.putAsyncRetryFailed(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken<Product>() {
    }.getType(), LROsPutAsyncRetryFailedHeaders.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)

Example 45 with Product

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

the class LROsImpl method putNoHeaderInRetryWithServiceResponseAsync.

/**
 * Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponseWithHeaders<Product, LROsPutNoHeaderInRetryHeaders>> putNoHeaderInRetryWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.putNoHeaderInRetry(product, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken<Product>() {
    }.getType(), LROsPutNoHeaderInRetryHeaders.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