use of com.microsoft.azure.keyvault.models.CertificateOperationUpdateParameter in project azure-sdk-for-java by Azure.
the class KeyVaultClientImpl method updateCertificateOperationWithServiceResponseAsync.
/**
* Updates a certificate operation.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
* @param certificateName The name of the certificate.
* @param cancellationRequested Indicates if cancellation was requested on the certificate operation.
* @return the observable to the CertificateOperation object
*/
public Observable<ServiceResponse<CertificateOperation>> updateCertificateOperationWithServiceResponseAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested) {
if (vaultBaseUrl == null) {
throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null.");
}
if (certificateName == null) {
throw new IllegalArgumentException("Parameter certificateName is required and cannot be null.");
}
if (this.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
}
CertificateOperationUpdateParameter certificateOperation = new CertificateOperationUpdateParameter();
certificateOperation.withCancellationRequested(cancellationRequested);
String parameterizedHost = Joiner.on(", ").join("{vaultBaseUrl}", vaultBaseUrl);
return service.updateCertificateOperation(certificateName, this.apiVersion(), this.acceptLanguage(), certificateOperation, parameterizedHost, this.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CertificateOperation>>>() {
@Override
public Observable<ServiceResponse<CertificateOperation>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CertificateOperation> clientResponse = updateCertificateOperationDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Aggregations