use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class JobsImpl method patch.
/**
* Updates the properties of a job.
*
* @param jobId The id of the job whose properties you want to update.
* @param jobPatchParameter The parameters for the request.
* @param jobPatchOptions 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, JobPatchHeaders> patch(String jobId, JobPatchParameter jobPatchParameter, JobPatchOptions jobPatchOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (jobId == null) {
throw new IllegalArgumentException("Parameter jobId is required and cannot be null.");
}
if (jobPatchParameter == null) {
throw new IllegalArgumentException("Parameter jobPatchParameter 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(jobPatchParameter);
Validator.validate(jobPatchOptions);
Integer timeout = null;
if (jobPatchOptions != null) {
timeout = jobPatchOptions.timeout();
}
String clientRequestId = null;
if (jobPatchOptions != null) {
clientRequestId = jobPatchOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (jobPatchOptions != null) {
returnClientRequestId = jobPatchOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (jobPatchOptions != null) {
ocpDate = jobPatchOptions.ocpDate();
}
String ifMatch = null;
if (jobPatchOptions != null) {
ifMatch = jobPatchOptions.ifMatch();
}
String ifNoneMatch = null;
if (jobPatchOptions != null) {
ifNoneMatch = jobPatchOptions.ifNoneMatch();
}
DateTime ifModifiedSince = null;
if (jobPatchOptions != null) {
ifModifiedSince = jobPatchOptions.ifModifiedSince();
}
DateTime ifUnmodifiedSince = null;
if (jobPatchOptions != null) {
ifUnmodifiedSince = jobPatchOptions.ifUnmodifiedSince();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
Call<ResponseBody> call = service.patch(jobId, jobPatchParameter, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.userAgent());
return patchDelegate(call.execute());
}
use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class JobsImpl method listPreparationAndReleaseTaskStatusNext.
/**
* Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run.
*
* @param nextPageLink The NextLink from the previous successful call to List 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<JobPreparationAndReleaseTaskExecutionInformation> object wrapped in {@link ServiceResponseWithHeaders} if successful.
*/
public ServiceResponseWithHeaders<PageImpl<JobPreparationAndReleaseTaskExecutionInformation>, JobListPreparationAndReleaseTaskStatusHeaders> listPreparationAndReleaseTaskStatusNext(final String nextPageLink) throws BatchErrorException, IOException, IllegalArgumentException {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
final JobListPreparationAndReleaseTaskStatusNextOptions jobListPreparationAndReleaseTaskStatusNextOptions = null;
String clientRequestId = null;
Boolean returnClientRequestId = null;
DateTime ocpDate = null;
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.listPreparationAndReleaseTaskStatusNext(nextPageLink, this.client.acceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return listPreparationAndReleaseTaskStatusNextDelegate(call.execute());
}
use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class JobsImpl method enable.
/**
* Enables the specified job, allowing new tasks to run.
*
* @param jobId The id of the job to enable.
* @param jobEnableOptions 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, JobEnableHeaders> enable(String jobId, JobEnableOptions jobEnableOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (jobId == null) {
throw new IllegalArgumentException("Parameter jobId 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(jobEnableOptions);
Integer timeout = null;
if (jobEnableOptions != null) {
timeout = jobEnableOptions.timeout();
}
String clientRequestId = null;
if (jobEnableOptions != null) {
clientRequestId = jobEnableOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (jobEnableOptions != null) {
returnClientRequestId = jobEnableOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (jobEnableOptions != null) {
ocpDate = jobEnableOptions.ocpDate();
}
String ifMatch = null;
if (jobEnableOptions != null) {
ifMatch = jobEnableOptions.ifMatch();
}
String ifNoneMatch = null;
if (jobEnableOptions != null) {
ifNoneMatch = jobEnableOptions.ifNoneMatch();
}
DateTime ifModifiedSince = null;
if (jobEnableOptions != null) {
ifModifiedSince = jobEnableOptions.ifModifiedSince();
}
DateTime ifUnmodifiedSince = null;
if (jobEnableOptions != null) {
ifUnmodifiedSince = jobEnableOptions.ifUnmodifiedSince();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
Call<ResponseBody> call = service.enable(jobId, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.userAgent());
return enableDelegate(call.execute());
}
use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class JobsImpl method delete.
/**
* Deletes a job.
*
* @param jobId The id of the job to delete.
* @param jobDeleteOptions 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, JobDeleteHeaders> delete(String jobId, JobDeleteOptions jobDeleteOptions) throws BatchErrorException, IOException, IllegalArgumentException {
if (jobId == null) {
throw new IllegalArgumentException("Parameter jobId 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(jobDeleteOptions);
Integer timeout = null;
if (jobDeleteOptions != null) {
timeout = jobDeleteOptions.timeout();
}
String clientRequestId = null;
if (jobDeleteOptions != null) {
clientRequestId = jobDeleteOptions.clientRequestId();
}
Boolean returnClientRequestId = null;
if (jobDeleteOptions != null) {
returnClientRequestId = jobDeleteOptions.returnClientRequestId();
}
DateTime ocpDate = null;
if (jobDeleteOptions != null) {
ocpDate = jobDeleteOptions.ocpDate();
}
String ifMatch = null;
if (jobDeleteOptions != null) {
ifMatch = jobDeleteOptions.ifMatch();
}
String ifNoneMatch = null;
if (jobDeleteOptions != null) {
ifNoneMatch = jobDeleteOptions.ifNoneMatch();
}
DateTime ifModifiedSince = null;
if (jobDeleteOptions != null) {
ifModifiedSince = jobDeleteOptions.ifModifiedSince();
}
DateTime ifUnmodifiedSince = null;
if (jobDeleteOptions != null) {
ifUnmodifiedSince = jobDeleteOptions.ifUnmodifiedSince();
}
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
Call<ResponseBody> call = service.delete(jobId, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.userAgent());
return deleteDelegate(call.execute());
}
use of com.microsoft.rest.DateTimeRfc1123 in project azure-sdk-for-java by Azure.
the class JobsImpl method add.
/**
* Adds a job to the specified account.
*
* @param job The job to be added.
* @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, JobAddHeaders> add(JobAddParameter job) throws BatchErrorException, IOException, IllegalArgumentException {
if (job == null) {
throw new IllegalArgumentException("Parameter job 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(job);
final JobAddOptions jobAddOptions = null;
Integer timeout = null;
String clientRequestId = null;
Boolean returnClientRequestId = null;
DateTime ocpDate = null;
DateTimeRfc1123 ocpDateConverted = null;
if (ocpDate != null) {
ocpDateConverted = new DateTimeRfc1123(ocpDate);
}
Call<ResponseBody> call = service.add(job, this.client.apiVersion(), this.client.acceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, this.client.userAgent());
return addDelegate(call.execute());
}
Aggregations