Search in sources :

Example 6 with PUT

use of retrofit2.http.PUT in project autorest.java by Azure.

the class LROSADsImpl method putNonRetry201Creating400InvalidJsonWithServiceResponseAsync.

/**
 * Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<Product>> putNonRetry201Creating400InvalidJsonWithServiceResponseAsync() {
    final Product product = null;
    Observable<Response<ResponseBody>> observable = service.putNonRetry201Creating400InvalidJson(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 7 with PUT

use of retrofit2.http.PUT 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 8 with PUT

use of retrofit2.http.PUT 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 9 with PUT

use of retrofit2.http.PUT in project autorest.java by Azure.

the class LROsImpl method putAsyncNonResourceWithServiceResponseAsync.

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

Example 10 with PUT

use of retrofit2.http.PUT 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)

Aggregations

Response (retrofit2.Response)36 ServiceResponse (com.microsoft.rest.ServiceResponse)33 TypeToken (com.google.common.reflect.TypeToken)31 Product (fixtures.lro.models.Product)27 SubProduct (fixtures.lro.models.SubProduct)15 Intent (android.content.Intent)2 Uri (android.net.Uri)2 ResponseBody (okhttp3.ResponseBody)2 ValueAnimator (android.animation.ValueAnimator)1 ActionBar (android.app.ActionBar)1 Activity (android.app.Activity)1 TaskStackBuilder (android.app.TaskStackBuilder)1 ActivityNotFoundException (android.content.ActivityNotFoundException)1 ComponentName (android.content.ComponentName)1 Context (android.content.Context)1 Intent.createChooser (android.content.Intent.createChooser)1 PackageManager (android.content.pm.PackageManager)1 Bitmap (android.graphics.Bitmap)1 BitmapFactory (android.graphics.BitmapFactory)1 Color (android.graphics.Color)1