/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ public Observable<PolicyDefinitionInner> getAsync(String policyDefinitionName) { return getWithServiceResponseAsync(policyDefinitionName).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() { @Override public PolicyDefinitionInner call(ServiceResponse<PolicyDefinitionInner> response) { return response.body(); } }); }
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ public Observable<PolicyDefinitionInner> getAsync(String policyDefinitionName) { return getWithServiceResponseAsync(policyDefinitionName).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() { @Override public PolicyDefinitionInner call(ServiceResponse<PolicyDefinitionInner> response) { return response.body(); } }); }
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<PolicyDefinitionInner> getAsync(String policyDefinitionName, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(policyDefinitionName), serviceCallback); }
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<PolicyDefinitionInner> getAsync(String policyDefinitionName, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(policyDefinitionName), serviceCallback); }
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyDefinitionInner object if successful. */ public PolicyDefinitionInner get(String policyDefinitionName) { return getWithServiceResponseAsync(policyDefinitionName).toBlocking().single().body(); }
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyDefinitionInner object if successful. */ public PolicyDefinitionInner get(String policyDefinitionName) { return getWithServiceResponseAsync(policyDefinitionName).toBlocking().single().body(); }