本文整理汇总了Java中com.microsoft.rest.ServiceResponseWithHeaders类的典型用法代码示例。如果您正苦于以下问题:Java ServiceResponseWithHeaders类的具体用法?Java ServiceResponseWithHeaders怎么用?Java ServiceResponseWithHeaders使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServiceResponseWithHeaders类属于com.microsoft.rest包,在下文中一共展示了ServiceResponseWithHeaders类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: beginPutAsyncRetrySucceededWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Product object
*/
public Observable<ServiceResponseWithHeaders<Product, LROsPutAsyncRetrySucceededHeaders>> beginPutAsyncRetrySucceededWithServiceResponseAsync(Product product) {
Validator.validate(product);
return service.beginPutAsyncRetrySucceeded(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Product, LROsPutAsyncRetrySucceededHeaders>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Product, LROsPutAsyncRetrySucceededHeaders>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Product, LROsPutAsyncRetrySucceededHeaders> clientResponse = beginPutAsyncRetrySucceededDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例2: beginPost202Retry200WithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200HeadersInner>> beginPost202Retry200WithServiceResponseAsync(ProductInner product) {
Validator.validate(product);
return service.beginPost202Retry200(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200HeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200HeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Void, LROsPost202Retry200HeadersInner> clientResponse = beginPost202Retry200Delegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例3: beginPutAsyncNoRetrySucceededWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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 to the ProductInner object
*/
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncNoRetrySucceededHeadersInner>> beginPutAsyncNoRetrySucceededWithServiceResponseAsync() {
final ProductInner product = null;
return service.beginPutAsyncNoRetrySucceeded(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncNoRetrySucceededHeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncNoRetrySucceededHeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<ProductInner, LROsPutAsyncNoRetrySucceededHeadersInner> clientResponse = beginPutAsyncNoRetrySucceededDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例4: beginPostAsyncRelativeRetryNoPayloadWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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 {@link ServiceResponseWithHeaders} object if successful.
*/
public Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeadersInner>> beginPostAsyncRelativeRetryNoPayloadWithServiceResponseAsync() {
final ProductInner product = null;
return service.beginPostAsyncRelativeRetryNoPayload(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeadersInner> clientResponse = beginPostAsyncRelativeRetryNoPayloadDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例5: beginPutAsyncRetryFailedWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductInner object
*/
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncRetryFailedHeadersInner>> beginPutAsyncRetryFailedWithServiceResponseAsync(ProductInner product) {
Validator.validate(product);
return service.beginPutAsyncRetryFailed(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncRetryFailedHeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPutAsyncRetryFailedHeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<ProductInner, LROsPutAsyncRetryFailedHeadersInner> clientResponse = beginPutAsyncRetryFailedDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例6: beginPutAsyncRetrySucceededWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. 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 to the ProductInner object
*/
public Observable<ServiceResponseWithHeaders<ProductInner, LROsCustomHeaderPutAsyncRetrySucceededHeadersInner>> beginPutAsyncRetrySucceededWithServiceResponseAsync() {
final ProductInner product = null;
return service.beginPutAsyncRetrySucceeded(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<ProductInner, LROsCustomHeaderPutAsyncRetrySucceededHeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<ProductInner, LROsCustomHeaderPutAsyncRetrySucceededHeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<ProductInner, LROsCustomHeaderPutAsyncRetrySucceededHeadersInner> clientResponse = beginPutAsyncRetrySucceededDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例7: beginPost202NoRetry204WithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* Long running post request, service returns a 202 to the initial request, with 'Location' header, 204 with noresponse body after success.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductInner object
*/
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPost202NoRetry204HeadersInner>> beginPost202NoRetry204WithServiceResponseAsync(ProductInner product) {
Validator.validate(product);
return service.beginPost202NoRetry204(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<ProductInner, LROsPost202NoRetry204HeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPost202NoRetry204HeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<ProductInner, LROsPost202NoRetry204HeadersInner> clientResponse = beginPost202NoRetry204Delegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例8: beginPost202Retry200WithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers>> beginPost202Retry200WithServiceResponseAsync(Product product) {
Validator.validate(product);
return service.beginPost202Retry200(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers> clientResponse = beginPost202Retry200Delegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例9: beginPostAsyncRelativeRetryNoPayloadWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeaders>> beginPostAsyncRelativeRetryNoPayloadWithServiceResponseAsync(Product product) {
Validator.validate(product);
return service.beginPostAsyncRelativeRetryNoPayload(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeaders>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeaders>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Void, LROSADsPostAsyncRelativeRetryNoPayloadHeaders> clientResponse = beginPostAsyncRelativeRetryNoPayloadDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例10: beginPost202Retry200WithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* Long running post request, service returns a 500, then 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 {@link ServiceResponseWithHeaders} object if successful.
*/
public Observable<ServiceResponseWithHeaders<Void, LRORetrysPost202Retry200HeadersInner>> beginPost202Retry200WithServiceResponseAsync() {
final ProductInner product = null;
return service.beginPost202Retry200(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, LRORetrysPost202Retry200HeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Void, LRORetrysPost202Retry200HeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Void, LRORetrysPost202Retry200HeadersInner> clientResponse = beginPost202Retry200Delegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例11: beginPutAsyncRelativeRetrySucceededWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* Long running put request, service returns a 500, then 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 to the Product object
*/
public Observable<ServiceResponseWithHeaders<Product, LRORetrysPutAsyncRelativeRetrySucceededHeaders>> beginPutAsyncRelativeRetrySucceededWithServiceResponseAsync() {
final Product product = null;
return service.beginPutAsyncRelativeRetrySucceeded(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Product, LRORetrysPutAsyncRelativeRetrySucceededHeaders>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Product, LRORetrysPutAsyncRelativeRetrySucceededHeaders>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Product, LRORetrysPutAsyncRelativeRetrySucceededHeaders> clientResponse = beginPutAsyncRelativeRetrySucceededDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例12: beginPutAsyncRetrySucceededWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. 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.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Product object
*/
public Observable<ServiceResponseWithHeaders<Product, LROsCustomHeaderPutAsyncRetrySucceededHeaders>> beginPutAsyncRetrySucceededWithServiceResponseAsync(Product product) {
Validator.validate(product);
return service.beginPutAsyncRetrySucceeded(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Product, LROsCustomHeaderPutAsyncRetrySucceededHeaders>>>() {
@Override
public Observable<ServiceResponseWithHeaders<Product, LROsCustomHeaderPutAsyncRetrySucceededHeaders>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<Product, LROsCustomHeaderPutAsyncRetrySucceededHeaders> clientResponse = beginPutAsyncRetrySucceededDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例13: beginPutAsyncRelativeRetryInvalidJsonPollingWithServiceResponseAsync
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* 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 to the ProductInner object
*/
public Observable<ServiceResponseWithHeaders<ProductInner, LROSADsPutAsyncRelativeRetryInvalidJsonPollingHeadersInner>> beginPutAsyncRelativeRetryInvalidJsonPollingWithServiceResponseAsync() {
final ProductInner product = null;
return service.beginPutAsyncRelativeRetryInvalidJsonPolling(product, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<ProductInner, LROSADsPutAsyncRelativeRetryInvalidJsonPollingHeadersInner>>>() {
@Override
public Observable<ServiceResponseWithHeaders<ProductInner, LROSADsPutAsyncRelativeRetryInvalidJsonPollingHeadersInner>> call(Response<ResponseBody> response) {
try {
ServiceResponseWithHeaders<ProductInner, LROSADsPutAsyncRelativeRetryInvalidJsonPollingHeadersInner> clientResponse = beginPutAsyncRelativeRetryInvalidJsonPollingDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
示例14: head300
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
@Test
public void head300() throws Exception {
client.httpRedirects().head300WithServiceResponseAsync()
.subscribe(new Action1<ServiceResponseWithHeaders<Void, HttpRedirectsHead300Headers>>() {
@Override
public void call(ServiceResponseWithHeaders<Void, HttpRedirectsHead300Headers> response) {
Assert.assertEquals(200, response.headResponse().code());
lock.countDown();
}
});
Assert.assertTrue(lock.await(100000, TimeUnit.MILLISECONDS));
}
示例15: beginPutAsyncRelativeRetry400Async
import com.microsoft.rest.ServiceResponseWithHeaders; //导入依赖的package包/类
/**
* Long running put request, service returns a 200 with 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 to the Product object
*/
public Observable<Product> beginPutAsyncRelativeRetry400Async() {
return beginPutAsyncRelativeRetry400WithServiceResponseAsync().map(new Func1<ServiceResponseWithHeaders<Product, LROSADsPutAsyncRelativeRetry400Headers>, Product>() {
@Override
public Product call(ServiceResponseWithHeaders<Product, LROSADsPutAsyncRelativeRetry400Headers> response) {
return response.body();
}
});
}