use of okhttp3.ResponseBody in project azure-sdk-for-java by Azure.
the class CertificatesImpl method cancelDeletion.
/**
* Cancels a failed deletion of a certificate from the specified account.
*
* @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be sha1.
* @param thumbprint The thumbprint of the certificate being deleted.
* @param certificateCancelDeletionOptions Additional parameters for the operation
* @throws BatchErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public ServiceResponseWithHeaders<Void, CertificateCancelDeletionHeaders> cancelDeletion(String thumbprintAlgorithm, String thumbprint, CertificateCancelDeletionOptions certificateCancelDeletionOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (thumbprintAlgorithm == null) {
throw new IllegalArgumentException("Parameter thumbprintAlgorithm is required and cannot be null.");
}
if (thumbprint == null) {
throw new IllegalArgumentException("Parameter thumbprint is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(certificateCancelDeletionOptions);
Integer timeout = null;
if (certificateCancelDeletionOptions != null) {
timeout = certificateCancelDeletionOptions.timeout();
}
String clientRequestId = null;
if (certificateCancelDeletionOptions != null) {
clientRequestId = certificateCancelDeletionOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (certificateCancelDeletionOptions != null) {
returnClientRequestId = certificateCancelDeletionOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (certificateCancelDeletionOptions != null) {
ocpDate = certificateCancelDeletionOptions.ocpDate();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.cancelDeletion(thumbprintAlgorithm, thumbprint, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return cancelDeletionDelegate(call.execute());
}
use of okhttp3.ResponseBody in project azure-sdk-for-java by Azure.
the class CertificatesImpl method listNext.
/**
* Lists all of the certificates that have been added to the specified account.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param certificateListNextOptions Additional parameters for the operation
* @throws BatchErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the List<Certificate> object wrapped in {@link ServiceResponseWithHeaders} if successful.
*/
public ServiceResponseWithHeaders<PageImpl<Certificate>, CertificateListHeaders> listNext(final String nextPageLink, final CertificateListNextOptions certificateListNextOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
Validator.validate(certificateListNextOptions);
String clientRequestId = null;
if (certificateListNextOptions != null) {
clientRequestId = certificateListNextOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (certificateListNextOptions != null) {
returnClientRequestId = certificateListNextOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (certificateListNextOptions != null) {
ocpDate = certificateListNextOptions.ocpDate();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.listNext(nextPageLink, this.client.acceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return listNextDelegate(call.execute());
}
use of okhttp3.ResponseBody in project azure-sdk-for-java by Azure.
the class ComputeNodesImpl method get.
/**
* Gets information about the specified compute node.
*
* @param poolId The id of the pool that contains the compute node.
* @param nodeId The id of the compute node that you want to get information about.
* @param computeNodeGetOptions Additional parameters for the operation
* @throws BatchErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the ComputeNode object wrapped in {@link ServiceResponseWithHeaders} if successful.
*/
public ServiceResponseWithHeaders<ComputeNode, ComputeNodeGetHeaders> get(String poolId, String nodeId, ComputeNodeGetOptions computeNodeGetOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (poolId == null) {
throw new IllegalArgumentException("Parameter poolId is required and cannot be null.");
}
if (nodeId == null) {
throw new IllegalArgumentException("Parameter nodeId is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(computeNodeGetOptions);
String select = null;
if (computeNodeGetOptions != null) {
select = computeNodeGetOptions.select();
}
Integer timeout = null;
if (computeNodeGetOptions != null) {
timeout = computeNodeGetOptions.timeout();
}
String clientRequestId = null;
if (computeNodeGetOptions != null) {
clientRequestId = computeNodeGetOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (computeNodeGetOptions != null) {
returnClientRequestId = computeNodeGetOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (computeNodeGetOptions != null) {
ocpDate = computeNodeGetOptions.ocpDate();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.get(poolId, nodeId, this.client.apiVersion(), this.client.acceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return getDelegate(call.execute());
}
use of okhttp3.ResponseBody in project azure-sdk-for-java by Azure.
the class ComputeNodesImpl method reboot.
/**
* Restarts the specified compute node.
*
* @param poolId The id of the pool that contains the compute node.
* @param nodeId The id of the compute node that you want to restart.
* @throws BatchErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public ServiceResponseWithHeaders<Void, ComputeNodeRebootHeaders> reboot(String poolId, String nodeId) throws BatchErrorException, IOException, IllegalArgumentException {
if (poolId == null) {
throw new IllegalArgumentException("Parameter poolId is required and cannot be null.");
}
if (nodeId == null) {
throw new IllegalArgumentException("Parameter nodeId is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
final ComputeNodeRebootOption nodeRebootOption = null;
final ComputeNodeRebootOptions computeNodeRebootOptions = null;
Integer timeout = null;
String clientRequestId = null;
Boolean returnClientRequestId = null;
DateTime ocpDate = null;
NodeRebootParameter nodeRebootParameter = new NodeRebootParameter();
nodeRebootParameter.withNodeRebootOption(null);
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.reboot(poolId, nodeId, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeRebootParameter, this.client.userAgent());
return rebootDelegate(call.execute());
}
use of okhttp3.ResponseBody in project azure-sdk-for-java by Azure.
the class ComputeNodesImpl method updateUser.
/**
* Updates the password or expiration time of a user account on the specified compute node.
*
* @param poolId The id of the pool that contains the compute node.
* @param nodeId The id of the machine on which you want to update a user account.
* @param userName The name of the user account to update.
* @param nodeUpdateUserParameter The parameters for the request.
* @param computeNodeUpdateUserOptions Additional parameters for the operation
* @throws BatchErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
public ServiceResponseWithHeaders<Void, ComputeNodeUpdateUserHeaders> updateUser(String poolId, String nodeId, String userName, NodeUpdateUserParameter nodeUpdateUserParameter, ComputeNodeUpdateUserOptions computeNodeUpdateUserOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (poolId == null) {
throw new IllegalArgumentException("Parameter poolId is required and cannot be null.");
}
if (nodeId == null) {
throw new IllegalArgumentException("Parameter nodeId is required and cannot be null.");
}
if (userName == null) {
throw new IllegalArgumentException("Parameter userName is required and cannot be null.");
}
if (nodeUpdateUserParameter == null) {
throw new IllegalArgumentException("Parameter nodeUpdateUserParameter is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(nodeUpdateUserParameter);
Validator.validate(computeNodeUpdateUserOptions);
Integer timeout = null;
if (computeNodeUpdateUserOptions != null) {
timeout = computeNodeUpdateUserOptions.timeout();
}
String clientRequestId = null;
if (computeNodeUpdateUserOptions != null) {
clientRequestId = computeNodeUpdateUserOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (computeNodeUpdateUserOptions != null) {
returnClientRequestId = computeNodeUpdateUserOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (computeNodeUpdateUserOptions != null) {
ocpDate = computeNodeUpdateUserOptions.ocpDate();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.updateUser(poolId, nodeId, userName, nodeUpdateUserParameter, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return updateUserDelegate(call.execute());
}
Aggregations