use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class ComputeNodesImpl method reimage.
/**
* Reinstalls the operating system on 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.
* @param nodeReimageOption When to reimage the compute node and what to do with currently running tasks. The default value is requeue. Possible values include: 'requeue', 'terminate', 'taskcompletion', 'retaineddata'
* @param computeNodeReimageOptions 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, ComputeNodeReimageHeaders> reimage(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, ComputeNodeReimageOptions computeNodeReimageOptions) 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(computeNodeReimageOptions);
Integer timeout = null;
if (computeNodeReimageOptions != null) {
timeout = computeNodeReimageOptions.timeout();
}
String clientRequestId = null;
if (computeNodeReimageOptions != null) {
clientRequestId = computeNodeReimageOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (computeNodeReimageOptions != null) {
returnClientRequestId = computeNodeReimageOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (computeNodeReimageOptions != null) {
ocpDate = computeNodeReimageOptions.ocpDate();
}
NodeReimageParameter nodeReimageParameter = null;
if (nodeReimageOption != null) {
nodeReimageParameter = new NodeReimageParameter();
nodeReimageParameter.withNodeReimageOption(nodeReimageOption);
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.reimage(poolId, nodeId, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeReimageParameter, this.client.userAgent());
return reimageDelegate(call.execute());
}
use of com.microsoft.rest.DateTimeRfc1123 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 com.microsoft.rest.DateTimeRfc1123 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 com.microsoft.rest.DateTimeRfc1123 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 com.microsoft.rest.DateTimeRfc1123 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());
}
Aggregations