diff --git a/azure-batch/pom.xml b/azure-batch/pom.xml
index d59faffd6f84..5b5c248da2d5 100644
--- a/azure-batch/pom.xml
+++ b/azure-batch/pom.xml
@@ -53,6 +53,7 @@
commons-codec
commons-codec
+ 1.10
junit
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/TaskOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/TaskOperations.java
index dadb51f7a140..5448a7c89446 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/TaskOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/TaskOperations.java
@@ -7,14 +7,14 @@
package com.microsoft.azure.batch;
import com.microsoft.azure.PagedList;
+import com.microsoft.azure.batch.interceptor.BatchClientParallelOptions;
import com.microsoft.azure.batch.protocol.models.*;
import com.microsoft.rest.ServiceResponseWithHeaders;
-import com.sun.javafx.tk.Toolkit;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CopyOnWriteArrayList;
public class TaskOperations implements IInheritedBehaviors {
TaskOperations(BatchClient batchClient, Collection customBehaviors) {
@@ -50,48 +50,187 @@ public void createTask(String jobId, TaskAddParameter taskToAdd, Iterable taskList) throws BatchErrorException, IOException {
+ public void createTasks(String jobId, List taskList) throws BatchErrorException, IOException, InterruptedException {
createTasks(jobId, taskList, null);
}
- public void createTasks(String jobId, List taskList, Iterable additionalBehaviors) throws BatchErrorException, IOException {
+ private static class WorkingThread implements Runnable {
+
final int MAX_TASKS_PER_REQUEST = 100;
- TaskAddCollectionOptions options = new TaskAddCollectionOptions();
- BehaviorManager bhMgr = new BehaviorManager(this.getCustomBehaviors(), additionalBehaviors);
- bhMgr.applyRequestBehaviors(options);
+ private BatchClient client;
+ private BehaviorManager bhMgr;
+ private String jobId;
+ private Queue pendingList;
+ private List failures;
+ private volatile Exception exception;
+ private final Object lock;
+
+ WorkingThread(BatchClient client, BehaviorManager bhMgr, String jobId, Queue pendingList, List failures, Object lock) {
+ this.client = client;
+ this.bhMgr = bhMgr;
+ this.jobId = jobId;
+ this.pendingList = pendingList;
+ this.failures = failures;
+ this.exception = null;
+ this.lock = lock;
+ }
- List pendingList = new ArrayList<>(taskList);
+ public Exception getException() {
+ return this.exception;
+ }
- while (!pendingList.isEmpty()) {
- List currentList = pendingList.subList(0, MAX_TASKS_PER_REQUEST - 1);
- pendingList.removeAll(currentList);
-
- ServiceResponseWithHeaders response = this._parentBatchClient.getProtocolLayer().getTaskOperations().addCollection(jobId, currentList, options);
- if (response.getBody() != null && response.getBody().getValue() != null) {
- List failures = new ArrayList<>();
-
- for (TaskAddResult result : response.getBody().getValue()) {
- if (result.getError() != null){
- if (result.getStatus() == TaskAddStatus.SERVERERROR) {
- for (TaskAddParameter addParameter : taskList) {
- if (addParameter.getId() == result.getTaskId()) {
- pendingList.add(addParameter);
- break;
+ @Override
+ public void run() {
+
+ List taskList = new LinkedList<>();
+
+ // Take the task from the queue up to MAX_TASKS_PER_REQUEST
+ int count = 0;
+ while (count < MAX_TASKS_PER_REQUEST) {
+ TaskAddParameter param = pendingList.poll();
+ if (param != null) {
+ taskList.add(param);
+ count++;
+ }
+ else {
+ break;
+ }
+ }
+
+ if (taskList.size() > 0) {
+ // The option should be different to every server calls (for example, client-request-id)
+ TaskAddCollectionOptions options = new TaskAddCollectionOptions();
+ this.bhMgr.applyRequestBehaviors(options);
+
+ try {
+ ServiceResponseWithHeaders response = this.client.getProtocolLayer().getTaskOperations().addCollection(this.jobId, taskList, options);
+
+ if (response.getBody() != null && response.getBody().getValue() != null) {
+ for (TaskAddResult result : response.getBody().getValue()) {
+ if (result.getError() != null) {
+ if (result.getStatus() == TaskAddStatus.SERVERERROR) {
+ // Server error will be retried
+ for (TaskAddParameter addParameter : taskList) {
+ if (addParameter.getId().equals(result.getTaskId())) {
+ pendingList.add(addParameter);
+ break;
+ }
+ }
+ } else if (result.getStatus() == TaskAddStatus.CLIENTERROR && !result.getError().getCode().equals(BatchErrorCodeStrings.TaskExists)) {
+ // Client error will be recorded
+ failures.add(result);
}
}
}
- else if (result.getStatus() == TaskAddStatus.CLIENTERROR && result.getError().getCode() != BatchErrorCodeStrings.TaskExists) {
- failures.add(result);
+ }
+ } catch (BatchErrorException | IOException e) {
+ // Any exception will stop further call
+ exception = e;
+ pendingList.addAll(taskList);
+ }
+ }
+
+ synchronized (lock) {
+ // Notify main thread that sub thread finished
+ lock.notify();
+ }
+ }
+ }
+
+ public void createTasks(String jobId, List taskList, Iterable additionalBehaviors) throws BatchErrorException, IOException, InterruptedException {
+
+ BehaviorManager bhMgr = new BehaviorManager(this.getCustomBehaviors(), additionalBehaviors);
+
+ // Default thread number is 1
+ int threadNumber = 1;
+
+ // Get user defined thread number
+ for (BatchClientBehavior op : bhMgr.getMasterListOfBehaviors()) {
+ if (op instanceof BatchClientParallelOptions) {
+ threadNumber = ((BatchClientParallelOptions) op).getMaxDegreeOfParallelism();
+ break;
+ }
+ }
+
+ final Object lock = new Object();
+ ConcurrentLinkedQueue pendingList = new ConcurrentLinkedQueue<>(taskList);
+ CopyOnWriteArrayList failures = new CopyOnWriteArrayList<>();
+
+ Map threads = new HashMap<>();
+ Exception innerException = null;
+
+ while (!pendingList.isEmpty()) {
+
+ if (threads.size() < threadNumber) {
+ // Kick as many as possible add tasks requests by max allowed threads
+ WorkingThread worker = new WorkingThread(this._parentBatchClient, bhMgr, jobId, pendingList, failures, lock);
+ Thread thread = new Thread(worker);
+ thread.start();
+ threads.put(thread, worker);
+ }
+ else {
+ // Wait any thread finished
+ synchronized (lock) {
+ lock.wait();
+ }
+
+ List finishedThreads = new ArrayList<>();
+ for (Thread t : threads.keySet()) {
+ if (t.getState() == Thread.State.TERMINATED) {
+ finishedThreads.add(t);
+ // If any exception happened, do not care the left requests
+ innerException = threads.get(t).getException();
+ if (innerException != null) {
+ break;
}
}
}
- if (!failures.isEmpty()) {
- throw new CreateTasksTerminatedException("At least one task failed to be added.", failures, pendingList);
+ // Free thread pool, so we can start more threads to send the request
+ threads.keySet().removeAll(finishedThreads);
+
+ // Any errors happened, we stop
+ if (innerException != null || !failures.isEmpty()) {
+ break;
+ }
+ }
+ }
+
+ // May sure all the left threads finished
+ for (Thread t : threads.keySet()) {
+ t.join();
+ }
+
+ if (innerException == null) {
+ // Anything bad happened at the left threads?
+ for (Thread t : threads.keySet()) {
+ innerException = threads.get(t).getException();
+ if (innerException != null) {
+ break;
}
}
}
+
+ if (innerException != null) {
+ // We throw any exception happened in sub thread
+ if (innerException instanceof BatchErrorException) {
+ throw (BatchErrorException) innerException;
+ } else {
+ throw (IOException) innerException;
+ }
+ }
+
+ if (!failures.isEmpty()) {
+ // Report any client error with leftover request
+ List notFinished = new ArrayList<>();
+ for (TaskAddParameter param : pendingList) {
+ notFinished.add(param);
+ }
+ throw new CreateTasksTerminatedException("At least one task failed to be added.", failures, notFinished);
+ }
+
+ // We succeed here
}
public List listTasks(String jobId) throws BatchErrorException, IOException {
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/BatchClientParallelOptions.java b/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/BatchClientParallelOptions.java
new file mode 100644
index 000000000000..187bce19a9d0
--- /dev/null
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/BatchClientParallelOptions.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.batch.interceptor;
+
+import com.microsoft.azure.batch.BatchClientBehavior;
+
+public class BatchClientParallelOptions extends BatchClientBehavior {
+
+ private int maxDegreeOfParallelism;
+
+ ///
+ /// Gets or sets the maximum number of concurrent tasks enabled by this instance.
+ /// The default value is 1.
+ ///
+ public int getMaxDegreeOfParallelism() {
+ return this.maxDegreeOfParallelism;
+ }
+
+ public void setMaxDegreeOfParallelism(int maxDegreeOfParallelism) {
+ if (maxDegreeOfParallelism > 0) {
+ this.maxDegreeOfParallelism = maxDegreeOfParallelism;
+ }
+ else {
+ throw new IllegalArgumentException("maxDegreeOfParallelism");
+ }
+ }
+
+ public BatchClientParallelOptions() {
+ this.maxDegreeOfParallelism = 1;
+ }
+
+ public BatchClientParallelOptions(int maxDegreeOfParallelism) {
+ this.maxDegreeOfParallelism = maxDegreeOfParallelism;
+ }
+
+}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/ServerTimeoutInterceptor.java b/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/ServerTimeoutInterceptor.java
new file mode 100644
index 000000000000..cdac5533542e
--- /dev/null
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/interceptor/ServerTimeoutInterceptor.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.batch.interceptor;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class ServerTimeoutInterceptor extends RequestInterceptor {
+
+ private final int serverTimeout;
+
+ public ServerTimeoutInterceptor(int timeout) {
+ this.serverTimeout = timeout;
+ this.setHandler(new BatchRequestInterceptHandler() {
+ @Override
+ public void modify(Object request) {
+ Class> c = request.getClass();
+ try {
+ Method timeoutMethod = c.getMethod("setTimeout", new Class[]{Integer.class});
+ if (timeoutMethod != null) {
+ timeoutMethod.invoke(request, serverTimeout);
+ }
+ } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException ex) {
+ }
+ }
+ });
+ }
+}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/AccountOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/AccountOperationsImpl.java
index 6c8b79aad829..a0c237c6b8fd 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/AccountOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/AccountOperationsImpl.java
@@ -85,46 +85,17 @@ public ServiceResponseWithHeaders, AccountListNodeAgentS
}
final AccountListNodeAgentSkusOptions accountListNodeAgentSkusOptions = null;
String filter = null;
- if (accountListNodeAgentSkusOptions != null) {
- filter = accountListNodeAgentSkusOptions.getFilter();
- }
Integer maxResults = null;
- if (accountListNodeAgentSkusOptions != null) {
- maxResults = accountListNodeAgentSkusOptions.getMaxResults();
- }
Integer timeout = null;
- if (accountListNodeAgentSkusOptions != null) {
- timeout = accountListNodeAgentSkusOptions.getTimeout();
- }
String clientRequestId = null;
- if (accountListNodeAgentSkusOptions != null) {
- clientRequestId = accountListNodeAgentSkusOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (accountListNodeAgentSkusOptions != null) {
- returnClientRequestId = accountListNodeAgentSkusOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (accountListNodeAgentSkusOptions != null) {
- ocpDate = accountListNodeAgentSkusOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNodeAgentSkus(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions = null;
- if (accountListNodeAgentSkusOptions != null) {
- accountListNodeAgentSkusNextOptions = new AccountListNodeAgentSkusNextOptions();
- accountListNodeAgentSkusNextOptions.setClientRequestId(accountListNodeAgentSkusOptions.getClientRequestId());
- accountListNodeAgentSkusNextOptions.setReturnClientRequestId(accountListNodeAgentSkusOptions.getReturnClientRequestId());
- accountListNodeAgentSkusNextOptions.setOcpDate(accountListNodeAgentSkusOptions.getOcpDate());
- }
- return listNodeAgentSkusNext(nextPageLink, accountListNodeAgentSkusNextOptions).getBody();
+ return listNodeAgentSkusNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -147,33 +118,11 @@ public ServiceCall listNodeAgentSkusAsync(final ListOperationCallback call = service.listNodeAgentSkus(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -184,14 +133,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions = null;
- if (accountListNodeAgentSkusOptions != null) {
- accountListNodeAgentSkusNextOptions = new AccountListNodeAgentSkusNextOptions();
- accountListNodeAgentSkusNextOptions.setClientRequestId(accountListNodeAgentSkusOptions.getClientRequestId());
- accountListNodeAgentSkusNextOptions.setReturnClientRequestId(accountListNodeAgentSkusOptions.getReturnClientRequestId());
- accountListNodeAgentSkusNextOptions.setOcpDate(accountListNodeAgentSkusOptions.getOcpDate());
- }
- listNodeAgentSkusNextAsync(result.getBody().getNextPageLink(), accountListNodeAgentSkusNextOptions, serviceCall, serviceCallback);
+ listNodeAgentSkusNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -359,21 +301,8 @@ public ServiceResponseWithHeaders, AccountListNodeAgentSk
}
final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions = null;
String clientRequestId = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- clientRequestId = accountListNodeAgentSkusNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- returnClientRequestId = accountListNodeAgentSkusNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- ocpDate = accountListNodeAgentSkusNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNodeAgentSkusNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listNodeAgentSkusNextDelegate(call.execute());
}
@@ -397,21 +326,8 @@ public ServiceCall listNodeAgentSkusNextAsync(final String nextPageLink, final S
}
final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions = null;
String clientRequestId = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- clientRequestId = accountListNodeAgentSkusNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- returnClientRequestId = accountListNodeAgentSkusNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (accountListNodeAgentSkusNextOptions != null) {
- ocpDate = accountListNodeAgentSkusNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNodeAgentSkusNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -422,7 +338,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listNodeAgentSkusNextAsync(result.getBody().getNextPageLink(), accountListNodeAgentSkusNextOptions, serviceCall, serviceCallback);
+ listNodeAgentSkusNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ApplicationOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ApplicationOperationsImpl.java
index 4656dba42c59..71e43c45f7f4 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ApplicationOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ApplicationOperationsImpl.java
@@ -93,42 +93,16 @@ public ServiceResponseWithHeaders, ApplicationList
}
final ApplicationListOptions applicationListOptions = null;
Integer maxResults = null;
- if (applicationListOptions != null) {
- maxResults = applicationListOptions.getMaxResults();
- }
Integer timeout = null;
- if (applicationListOptions != null) {
- timeout = applicationListOptions.getTimeout();
- }
String clientRequestId = null;
- if (applicationListOptions != null) {
- clientRequestId = applicationListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (applicationListOptions != null) {
- returnClientRequestId = applicationListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (applicationListOptions != null) {
- ocpDate = applicationListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, ApplicationListHeaders> response = listDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- ApplicationListNextOptions applicationListNextOptions = null;
- if (applicationListOptions != null) {
- applicationListNextOptions = new ApplicationListNextOptions();
- applicationListNextOptions.setClientRequestId(applicationListOptions.getClientRequestId());
- applicationListNextOptions.setReturnClientRequestId(applicationListOptions.getReturnClientRequestId());
- applicationListNextOptions.setOcpDate(applicationListOptions.getOcpDate());
- }
- return listNext(nextPageLink, applicationListNextOptions).getBody();
+ return listNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -151,29 +125,10 @@ public ServiceCall listAsync(final ListOperationCallback ser
}
final ApplicationListOptions applicationListOptions = null;
Integer maxResults = null;
- if (applicationListOptions != null) {
- maxResults = applicationListOptions.getMaxResults();
- }
Integer timeout = null;
- if (applicationListOptions != null) {
- timeout = applicationListOptions.getTimeout();
- }
String clientRequestId = null;
- if (applicationListOptions != null) {
- clientRequestId = applicationListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (applicationListOptions != null) {
- returnClientRequestId = applicationListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (applicationListOptions != null) {
- ocpDate = applicationListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -184,14 +139,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- ApplicationListNextOptions applicationListNextOptions = null;
- if (applicationListOptions != null) {
- applicationListNextOptions = new ApplicationListNextOptions();
- applicationListNextOptions.setClientRequestId(applicationListOptions.getClientRequestId());
- applicationListNextOptions.setReturnClientRequestId(applicationListOptions.getReturnClientRequestId());
- applicationListNextOptions.setOcpDate(applicationListOptions.getOcpDate());
- }
- listNextAsync(result.getBody().getNextPageLink(), applicationListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -354,25 +302,9 @@ public ServiceResponseWithHeaders get
}
final ApplicationGetOptions applicationGetOptions = null;
Integer timeout = null;
- if (applicationGetOptions != null) {
- timeout = applicationGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (applicationGetOptions != null) {
- clientRequestId = applicationGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (applicationGetOptions != null) {
- returnClientRequestId = applicationGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (applicationGetOptions != null) {
- ocpDate = applicationGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(applicationId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getDelegate(call.execute());
}
@@ -399,25 +331,9 @@ public ServiceCall getAsync(String applicationId, final ServiceCallback call = service.get(applicationId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -554,21 +470,8 @@ public ServiceResponseWithHeaders, ApplicationListH
}
final ApplicationListNextOptions applicationListNextOptions = null;
String clientRequestId = null;
- if (applicationListNextOptions != null) {
- clientRequestId = applicationListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (applicationListNextOptions != null) {
- returnClientRequestId = applicationListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (applicationListNextOptions != null) {
- ocpDate = applicationListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listNextDelegate(call.execute());
}
@@ -592,21 +495,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se
}
final ApplicationListNextOptions applicationListNextOptions = null;
String clientRequestId = null;
- if (applicationListNextOptions != null) {
- clientRequestId = applicationListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (applicationListNextOptions != null) {
- returnClientRequestId = applicationListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (applicationListNextOptions != null) {
- ocpDate = applicationListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -617,7 +507,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listNextAsync(result.getBody().getNextPageLink(), applicationListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperationsImpl.java
index c2140d8997ed..c21c56680c66 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperationsImpl.java
@@ -120,25 +120,9 @@ public ServiceResponseWithHeaders add(CertificateAd
Validator.validate(certificate);
final CertificateAddOptions certificateAddOptions = null;
Integer timeout = null;
- if (certificateAddOptions != null) {
- timeout = certificateAddOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateAddOptions != null) {
- clientRequestId = certificateAddOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateAddOptions != null) {
- returnClientRequestId = certificateAddOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateAddOptions != null) {
- ocpDate = certificateAddOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.add(certificate, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return addDelegate(call.execute());
}
@@ -166,25 +150,9 @@ public ServiceCall addAsync(CertificateAddParameter certificate, final ServiceCa
Validator.validate(certificate, serviceCallback);
final CertificateAddOptions certificateAddOptions = null;
Integer timeout = null;
- if (certificateAddOptions != null) {
- timeout = certificateAddOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateAddOptions != null) {
- clientRequestId = certificateAddOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateAddOptions != null) {
- returnClientRequestId = certificateAddOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateAddOptions != null) {
- ocpDate = certificateAddOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.add(certificate, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -322,50 +290,18 @@ public ServiceResponseWithHeaders, CertificateListHeaders
}
final CertificateListOptions certificateListOptions = null;
String filter = null;
- if (certificateListOptions != null) {
- filter = certificateListOptions.getFilter();
- }
String select = null;
- if (certificateListOptions != null) {
- select = certificateListOptions.getSelect();
- }
Integer maxResults = null;
- if (certificateListOptions != null) {
- maxResults = certificateListOptions.getMaxResults();
- }
Integer timeout = null;
- if (certificateListOptions != null) {
- timeout = certificateListOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateListOptions != null) {
- clientRequestId = certificateListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateListOptions != null) {
- returnClientRequestId = certificateListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateListOptions != null) {
- ocpDate = certificateListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, CertificateListHeaders> response = listDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- CertificateListNextOptions certificateListNextOptions = null;
- if (certificateListOptions != null) {
- certificateListNextOptions = new CertificateListNextOptions();
- certificateListNextOptions.setClientRequestId(certificateListOptions.getClientRequestId());
- certificateListNextOptions.setReturnClientRequestId(certificateListOptions.getReturnClientRequestId());
- certificateListNextOptions.setOcpDate(certificateListOptions.getOcpDate());
- }
- return listNext(nextPageLink, certificateListNextOptions).getBody();
+ return listNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -388,37 +324,12 @@ public ServiceCall listAsync(final ListOperationCallback serviceCal
}
final CertificateListOptions certificateListOptions = null;
String filter = null;
- if (certificateListOptions != null) {
- filter = certificateListOptions.getFilter();
- }
String select = null;
- if (certificateListOptions != null) {
- select = certificateListOptions.getSelect();
- }
Integer maxResults = null;
- if (certificateListOptions != null) {
- maxResults = certificateListOptions.getMaxResults();
- }
Integer timeout = null;
- if (certificateListOptions != null) {
- timeout = certificateListOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateListOptions != null) {
- clientRequestId = certificateListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateListOptions != null) {
- returnClientRequestId = certificateListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateListOptions != null) {
- ocpDate = certificateListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -429,14 +340,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- CertificateListNextOptions certificateListNextOptions = null;
- if (certificateListOptions != null) {
- certificateListNextOptions = new CertificateListNextOptions();
- certificateListNextOptions.setClientRequestId(certificateListOptions.getClientRequestId());
- certificateListNextOptions.setReturnClientRequestId(certificateListOptions.getReturnClientRequestId());
- certificateListNextOptions.setOcpDate(certificateListOptions.getOcpDate());
- }
- listNextAsync(result.getBody().getNextPageLink(), certificateListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -619,25 +523,9 @@ public ServiceResponseWithHeaders cancel
}
final CertificateCancelDeletionOptions certificateCancelDeletionOptions = null;
Integer timeout = null;
- if (certificateCancelDeletionOptions != null) {
- timeout = certificateCancelDeletionOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateCancelDeletionOptions != null) {
- clientRequestId = certificateCancelDeletionOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateCancelDeletionOptions != null) {
- returnClientRequestId = certificateCancelDeletionOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateCancelDeletionOptions != null) {
- ocpDate = certificateCancelDeletionOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.cancelDeletion(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return cancelDeletionDelegate(call.execute());
}
@@ -669,25 +557,9 @@ public ServiceCall cancelDeletionAsync(String thumbprintAlgorithm, String thumbp
}
final CertificateCancelDeletionOptions certificateCancelDeletionOptions = null;
Integer timeout = null;
- if (certificateCancelDeletionOptions != null) {
- timeout = certificateCancelDeletionOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateCancelDeletionOptions != null) {
- clientRequestId = certificateCancelDeletionOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateCancelDeletionOptions != null) {
- returnClientRequestId = certificateCancelDeletionOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateCancelDeletionOptions != null) {
- ocpDate = certificateCancelDeletionOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.cancelDeletion(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -840,25 +712,9 @@ public ServiceResponseWithHeaders delete(String
}
final CertificateDeleteOptions certificateDeleteOptions = null;
Integer timeout = null;
- if (certificateDeleteOptions != null) {
- timeout = certificateDeleteOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateDeleteOptions != null) {
- clientRequestId = certificateDeleteOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateDeleteOptions != null) {
- returnClientRequestId = certificateDeleteOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateDeleteOptions != null) {
- ocpDate = certificateDeleteOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.delete(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return deleteDelegate(call.execute());
}
@@ -890,25 +746,9 @@ public ServiceCall deleteAsync(String thumbprintAlgorithm, String thumbprint, fi
}
final CertificateDeleteOptions certificateDeleteOptions = null;
Integer timeout = null;
- if (certificateDeleteOptions != null) {
- timeout = certificateDeleteOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateDeleteOptions != null) {
- clientRequestId = certificateDeleteOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateDeleteOptions != null) {
- returnClientRequestId = certificateDeleteOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateDeleteOptions != null) {
- ocpDate = certificateDeleteOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.delete(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1061,29 +901,10 @@ public ServiceResponseWithHeaders get(String
}
final CertificateGetOptions certificateGetOptions = null;
String select = null;
- if (certificateGetOptions != null) {
- select = certificateGetOptions.getSelect();
- }
Integer timeout = null;
- if (certificateGetOptions != null) {
- timeout = certificateGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateGetOptions != null) {
- clientRequestId = certificateGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateGetOptions != null) {
- returnClientRequestId = certificateGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateGetOptions != null) {
- ocpDate = certificateGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getDelegate(call.execute());
}
@@ -1115,29 +936,10 @@ public ServiceCall getAsync(String thumbprintAlgorithm, String thumbprint, final
}
final CertificateGetOptions certificateGetOptions = null;
String select = null;
- if (certificateGetOptions != null) {
- select = certificateGetOptions.getSelect();
- }
Integer timeout = null;
- if (certificateGetOptions != null) {
- timeout = certificateGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (certificateGetOptions != null) {
- clientRequestId = certificateGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateGetOptions != null) {
- returnClientRequestId = certificateGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateGetOptions != null) {
- ocpDate = certificateGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(thumbprintAlgorithm, thumbprint, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1291,21 +1093,8 @@ public ServiceResponseWithHeaders, CertificateListHeaders>
}
final CertificateListNextOptions certificateListNextOptions = null;
String clientRequestId = null;
- if (certificateListNextOptions != null) {
- clientRequestId = certificateListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateListNextOptions != null) {
- returnClientRequestId = certificateListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateListNextOptions != null) {
- ocpDate = certificateListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listNextDelegate(call.execute());
}
@@ -1329,21 +1118,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se
}
final CertificateListNextOptions certificateListNextOptions = null;
String clientRequestId = null;
- if (certificateListNextOptions != null) {
- clientRequestId = certificateListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (certificateListNextOptions != null) {
- returnClientRequestId = certificateListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (certificateListNextOptions != null) {
- ocpDate = certificateListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -1354,7 +1130,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listNextAsync(result.getBody().getNextPageLink(), certificateListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperationsImpl.java
index fd14235c0823..5f68ae1a1206 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperationsImpl.java
@@ -176,25 +176,9 @@ public ServiceResponseWithHeaders addUser(Strin
Validator.validate(user);
final ComputeNodeAddUserOptions computeNodeAddUserOptions = null;
Integer timeout = null;
- if (computeNodeAddUserOptions != null) {
- timeout = computeNodeAddUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeAddUserOptions != null) {
- clientRequestId = computeNodeAddUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeAddUserOptions != null) {
- returnClientRequestId = computeNodeAddUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeAddUserOptions != null) {
- ocpDate = computeNodeAddUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.addUser(poolId, nodeId, user, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return addUserDelegate(call.execute());
}
@@ -232,25 +216,9 @@ public ServiceCall addUserAsync(String poolId, String nodeId, ComputeNodeUser us
Validator.validate(user, serviceCallback);
final ComputeNodeAddUserOptions computeNodeAddUserOptions = null;
Integer timeout = null;
- if (computeNodeAddUserOptions != null) {
- timeout = computeNodeAddUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeAddUserOptions != null) {
- clientRequestId = computeNodeAddUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeAddUserOptions != null) {
- returnClientRequestId = computeNodeAddUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeAddUserOptions != null) {
- ocpDate = computeNodeAddUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.addUser(poolId, nodeId, user, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -418,25 +386,9 @@ public ServiceResponseWithHeaders deleteUser
}
final ComputeNodeDeleteUserOptions computeNodeDeleteUserOptions = null;
Integer timeout = null;
- if (computeNodeDeleteUserOptions != null) {
- timeout = computeNodeDeleteUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeDeleteUserOptions != null) {
- clientRequestId = computeNodeDeleteUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeDeleteUserOptions != null) {
- returnClientRequestId = computeNodeDeleteUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeDeleteUserOptions != null) {
- ocpDate = computeNodeDeleteUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteUser(poolId, nodeId, userName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return deleteUserDelegate(call.execute());
}
@@ -473,25 +425,9 @@ public ServiceCall deleteUserAsync(String poolId, String nodeId, String userName
}
final ComputeNodeDeleteUserOptions computeNodeDeleteUserOptions = null;
Integer timeout = null;
- if (computeNodeDeleteUserOptions != null) {
- timeout = computeNodeDeleteUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeDeleteUserOptions != null) {
- clientRequestId = computeNodeDeleteUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeDeleteUserOptions != null) {
- returnClientRequestId = computeNodeDeleteUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeDeleteUserOptions != null) {
- ocpDate = computeNodeDeleteUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteUser(poolId, nodeId, userName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -662,25 +598,9 @@ public ServiceResponseWithHeaders updateUser
Validator.validate(nodeUpdateUserParameter);
final ComputeNodeUpdateUserOptions computeNodeUpdateUserOptions = null;
Integer timeout = null;
- if (computeNodeUpdateUserOptions != null) {
- timeout = computeNodeUpdateUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeUpdateUserOptions != null) {
- clientRequestId = computeNodeUpdateUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeUpdateUserOptions != null) {
- returnClientRequestId = computeNodeUpdateUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeUpdateUserOptions != null) {
- ocpDate = computeNodeUpdateUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.updateUser(poolId, nodeId, userName, nodeUpdateUserParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return updateUserDelegate(call.execute());
}
@@ -723,25 +643,9 @@ public ServiceCall updateUserAsync(String poolId, String nodeId, String userName
Validator.validate(nodeUpdateUserParameter, serviceCallback);
final ComputeNodeUpdateUserOptions computeNodeUpdateUserOptions = null;
Integer timeout = null;
- if (computeNodeUpdateUserOptions != null) {
- timeout = computeNodeUpdateUserOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeUpdateUserOptions != null) {
- clientRequestId = computeNodeUpdateUserOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeUpdateUserOptions != null) {
- returnClientRequestId = computeNodeUpdateUserOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeUpdateUserOptions != null) {
- ocpDate = computeNodeUpdateUserOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.updateUser(poolId, nodeId, userName, nodeUpdateUserParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -914,29 +818,10 @@ public ServiceResponseWithHeaders get(String
}
final ComputeNodeGetOptions computeNodeGetOptions = null;
String select = null;
- if (computeNodeGetOptions != null) {
- select = computeNodeGetOptions.getSelect();
- }
Integer timeout = null;
- if (computeNodeGetOptions != null) {
- timeout = computeNodeGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeGetOptions != null) {
- clientRequestId = computeNodeGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeGetOptions != null) {
- returnClientRequestId = computeNodeGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeGetOptions != null) {
- ocpDate = computeNodeGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getDelegate(call.execute());
}
@@ -968,29 +853,10 @@ public ServiceCall getAsync(String poolId, String nodeId, final ServiceCallback<
}
final ComputeNodeGetOptions computeNodeGetOptions = null;
String select = null;
- if (computeNodeGetOptions != null) {
- select = computeNodeGetOptions.getSelect();
- }
Integer timeout = null;
- if (computeNodeGetOptions != null) {
- timeout = computeNodeGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeGetOptions != null) {
- clientRequestId = computeNodeGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeGetOptions != null) {
- returnClientRequestId = computeNodeGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeGetOptions != null) {
- ocpDate = computeNodeGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1152,30 +1018,11 @@ public ServiceResponseWithHeaders reboot(String
final ComputeNodeRebootOption nodeRebootOption = null;
final ComputeNodeRebootOptions computeNodeRebootOptions = null;
Integer timeout = null;
- if (computeNodeRebootOptions != null) {
- timeout = computeNodeRebootOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeRebootOptions != null) {
- clientRequestId = computeNodeRebootOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeRebootOptions != null) {
- returnClientRequestId = computeNodeRebootOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeRebootOptions != null) {
- ocpDate = computeNodeRebootOptions.getOcpDate();
- }
- NodeRebootParameter nodeRebootParameter = null;
- if (nodeRebootOption != null) {
- nodeRebootParameter = new NodeRebootParameter();
- nodeRebootParameter.setNodeRebootOption(nodeRebootOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeRebootParameter nodeRebootParameter = new NodeRebootParameter();
+ nodeRebootParameter = null;
Call call = service.reboot(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeRebootParameter);
return rebootDelegate(call.execute());
}
@@ -1208,30 +1055,11 @@ public ServiceCall rebootAsync(String poolId, String nodeId, final ServiceCallba
final ComputeNodeRebootOption nodeRebootOption = null;
final ComputeNodeRebootOptions computeNodeRebootOptions = null;
Integer timeout = null;
- if (computeNodeRebootOptions != null) {
- timeout = computeNodeRebootOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeRebootOptions != null) {
- clientRequestId = computeNodeRebootOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeRebootOptions != null) {
- returnClientRequestId = computeNodeRebootOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeRebootOptions != null) {
- ocpDate = computeNodeRebootOptions.getOcpDate();
- }
- NodeRebootParameter nodeRebootParameter = null;
- if (nodeRebootOption != null) {
- nodeRebootParameter = new NodeRebootParameter();
- nodeRebootParameter.setNodeRebootOption(nodeRebootOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeRebootParameter nodeRebootParameter = new NodeRebootParameter();
+ nodeRebootParameter = null;
Call call = service.reboot(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeRebootParameter);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1397,30 +1225,11 @@ public ServiceResponseWithHeaders reimage(Strin
final ComputeNodeReimageOption nodeReimageOption = null;
final ComputeNodeReimageOptions computeNodeReimageOptions = null;
Integer timeout = null;
- if (computeNodeReimageOptions != null) {
- timeout = computeNodeReimageOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeReimageOptions != null) {
- clientRequestId = computeNodeReimageOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeReimageOptions != null) {
- returnClientRequestId = computeNodeReimageOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeReimageOptions != null) {
- ocpDate = computeNodeReimageOptions.getOcpDate();
- }
- NodeReimageParameter nodeReimageParameter = null;
- if (nodeReimageOption != null) {
- nodeReimageParameter = new NodeReimageParameter();
- nodeReimageParameter.setNodeReimageOption(nodeReimageOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeReimageParameter nodeReimageParameter = new NodeReimageParameter();
+ nodeReimageParameter = null;
Call call = service.reimage(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeReimageParameter);
return reimageDelegate(call.execute());
}
@@ -1453,30 +1262,11 @@ public ServiceCall reimageAsync(String poolId, String nodeId, final ServiceCallb
final ComputeNodeReimageOption nodeReimageOption = null;
final ComputeNodeReimageOptions computeNodeReimageOptions = null;
Integer timeout = null;
- if (computeNodeReimageOptions != null) {
- timeout = computeNodeReimageOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeReimageOptions != null) {
- clientRequestId = computeNodeReimageOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeReimageOptions != null) {
- returnClientRequestId = computeNodeReimageOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeReimageOptions != null) {
- ocpDate = computeNodeReimageOptions.getOcpDate();
- }
- NodeReimageParameter nodeReimageParameter = null;
- if (nodeReimageOption != null) {
- nodeReimageParameter = new NodeReimageParameter();
- nodeReimageParameter.setNodeReimageOption(nodeReimageOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeReimageParameter nodeReimageParameter = new NodeReimageParameter();
+ nodeReimageParameter = null;
Call call = service.reimage(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeReimageParameter);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1642,30 +1432,11 @@ public ServiceResponseWithHeaders dis
final DisableComputeNodeSchedulingOption nodeDisableSchedulingOption = null;
final ComputeNodeDisableSchedulingOptions computeNodeDisableSchedulingOptions = null;
Integer timeout = null;
- if (computeNodeDisableSchedulingOptions != null) {
- timeout = computeNodeDisableSchedulingOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeDisableSchedulingOptions != null) {
- clientRequestId = computeNodeDisableSchedulingOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeDisableSchedulingOptions != null) {
- returnClientRequestId = computeNodeDisableSchedulingOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeDisableSchedulingOptions != null) {
- ocpDate = computeNodeDisableSchedulingOptions.getOcpDate();
- }
- NodeDisableSchedulingParameter nodeDisableSchedulingParameter = null;
- if (nodeDisableSchedulingOption != null) {
- nodeDisableSchedulingParameter = new NodeDisableSchedulingParameter();
- nodeDisableSchedulingParameter.setNodeDisableSchedulingOption(nodeDisableSchedulingOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeDisableSchedulingParameter nodeDisableSchedulingParameter = new NodeDisableSchedulingParameter();
+ nodeDisableSchedulingParameter = null;
Call call = service.disableScheduling(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeDisableSchedulingParameter);
return disableSchedulingDelegate(call.execute());
}
@@ -1698,30 +1469,11 @@ public ServiceCall disableSchedulingAsync(String poolId, String nodeId, final Se
final DisableComputeNodeSchedulingOption nodeDisableSchedulingOption = null;
final ComputeNodeDisableSchedulingOptions computeNodeDisableSchedulingOptions = null;
Integer timeout = null;
- if (computeNodeDisableSchedulingOptions != null) {
- timeout = computeNodeDisableSchedulingOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeDisableSchedulingOptions != null) {
- clientRequestId = computeNodeDisableSchedulingOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeDisableSchedulingOptions != null) {
- returnClientRequestId = computeNodeDisableSchedulingOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeDisableSchedulingOptions != null) {
- ocpDate = computeNodeDisableSchedulingOptions.getOcpDate();
- }
- NodeDisableSchedulingParameter nodeDisableSchedulingParameter = null;
- if (nodeDisableSchedulingOption != null) {
- nodeDisableSchedulingParameter = new NodeDisableSchedulingParameter();
- nodeDisableSchedulingParameter.setNodeDisableSchedulingOption(nodeDisableSchedulingOption);
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ NodeDisableSchedulingParameter nodeDisableSchedulingParameter = new NodeDisableSchedulingParameter();
+ nodeDisableSchedulingParameter = null;
Call call = service.disableScheduling(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, nodeDisableSchedulingParameter);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1886,25 +1638,9 @@ public ServiceResponseWithHeaders enab
}
final ComputeNodeEnableSchedulingOptions computeNodeEnableSchedulingOptions = null;
Integer timeout = null;
- if (computeNodeEnableSchedulingOptions != null) {
- timeout = computeNodeEnableSchedulingOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeEnableSchedulingOptions != null) {
- clientRequestId = computeNodeEnableSchedulingOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeEnableSchedulingOptions != null) {
- returnClientRequestId = computeNodeEnableSchedulingOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeEnableSchedulingOptions != null) {
- ocpDate = computeNodeEnableSchedulingOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.enableScheduling(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return enableSchedulingDelegate(call.execute());
}
@@ -1936,25 +1672,9 @@ public ServiceCall enableSchedulingAsync(String poolId, String nodeId, final Ser
}
final ComputeNodeEnableSchedulingOptions computeNodeEnableSchedulingOptions = null;
Integer timeout = null;
- if (computeNodeEnableSchedulingOptions != null) {
- timeout = computeNodeEnableSchedulingOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeEnableSchedulingOptions != null) {
- clientRequestId = computeNodeEnableSchedulingOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeEnableSchedulingOptions != null) {
- returnClientRequestId = computeNodeEnableSchedulingOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeEnableSchedulingOptions != null) {
- ocpDate = computeNodeEnableSchedulingOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.enableScheduling(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2107,25 +1827,9 @@ public ServiceResponseWithHeaders call = service.getRemoteLoginSettings(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getRemoteLoginSettingsDelegate(call.execute());
}
@@ -2157,25 +1861,9 @@ public ServiceCall getRemoteLoginSettingsAsync(String poolId, String nodeId, fin
}
final ComputeNodeGetRemoteLoginSettingsOptions computeNodeGetRemoteLoginSettingsOptions = null;
Integer timeout = null;
- if (computeNodeGetRemoteLoginSettingsOptions != null) {
- timeout = computeNodeGetRemoteLoginSettingsOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeGetRemoteLoginSettingsOptions != null) {
- clientRequestId = computeNodeGetRemoteLoginSettingsOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeGetRemoteLoginSettingsOptions != null) {
- returnClientRequestId = computeNodeGetRemoteLoginSettingsOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeGetRemoteLoginSettingsOptions != null) {
- ocpDate = computeNodeGetRemoteLoginSettingsOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.getRemoteLoginSettings(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2328,25 +2016,9 @@ public ServiceResponseWithHeaders call = service.getRemoteDesktop(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getRemoteDesktopDelegate(call.execute());
}
@@ -2378,25 +2050,9 @@ public ServiceCall getRemoteDesktopAsync(String poolId, String nodeId, final Ser
}
final ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions = null;
Integer timeout = null;
- if (computeNodeGetRemoteDesktopOptions != null) {
- timeout = computeNodeGetRemoteDesktopOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeGetRemoteDesktopOptions != null) {
- clientRequestId = computeNodeGetRemoteDesktopOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeGetRemoteDesktopOptions != null) {
- returnClientRequestId = computeNodeGetRemoteDesktopOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeGetRemoteDesktopOptions != null) {
- ocpDate = computeNodeGetRemoteDesktopOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.getRemoteDesktop(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2545,50 +2201,18 @@ public ServiceResponseWithHeaders, ComputeNodeListHeaders
}
final ComputeNodeListOptions computeNodeListOptions = null;
String filter = null;
- if (computeNodeListOptions != null) {
- filter = computeNodeListOptions.getFilter();
- }
String select = null;
- if (computeNodeListOptions != null) {
- select = computeNodeListOptions.getSelect();
- }
Integer maxResults = null;
- if (computeNodeListOptions != null) {
- maxResults = computeNodeListOptions.getMaxResults();
- }
Integer timeout = null;
- if (computeNodeListOptions != null) {
- timeout = computeNodeListOptions.getTimeout();
- }
String clientRequestId = null;
- if (computeNodeListOptions != null) {
- clientRequestId = computeNodeListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeListOptions != null) {
- returnClientRequestId = computeNodeListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeListOptions != null) {
- ocpDate = computeNodeListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, ComputeNodeListHeaders> response = listDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- ComputeNodeListNextOptions computeNodeListNextOptions = null;
- if (computeNodeListOptions != null) {
- computeNodeListNextOptions = new ComputeNodeListNextOptions();
- computeNodeListNextOptions.setClientRequestId(computeNodeListOptions.getClientRequestId());
- computeNodeListNextOptions.setReturnClientRequestId(computeNodeListOptions.getReturnClientRequestId());
- computeNodeListNextOptions.setOcpDate(computeNodeListOptions.getOcpDate());
- }
- return listNext(nextPageLink, computeNodeListNextOptions).getBody();
+ return listNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -2616,37 +2240,12 @@ public ServiceCall listAsync(final String poolId, final ListOperationCallback call = service.list(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2657,14 +2256,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- ComputeNodeListNextOptions computeNodeListNextOptions = null;
- if (computeNodeListOptions != null) {
- computeNodeListNextOptions = new ComputeNodeListNextOptions();
- computeNodeListNextOptions.setClientRequestId(computeNodeListOptions.getClientRequestId());
- computeNodeListNextOptions.setReturnClientRequestId(computeNodeListOptions.getReturnClientRequestId());
- computeNodeListNextOptions.setOcpDate(computeNodeListOptions.getOcpDate());
- }
- listNextAsync(result.getBody().getNextPageLink(), computeNodeListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -2849,21 +2441,8 @@ public ServiceResponseWithHeaders, ComputeNodeListHeaders>
}
final ComputeNodeListNextOptions computeNodeListNextOptions = null;
String clientRequestId = null;
- if (computeNodeListNextOptions != null) {
- clientRequestId = computeNodeListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeListNextOptions != null) {
- returnClientRequestId = computeNodeListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeListNextOptions != null) {
- ocpDate = computeNodeListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listNextDelegate(call.execute());
}
@@ -2887,21 +2466,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se
}
final ComputeNodeListNextOptions computeNodeListNextOptions = null;
String clientRequestId = null;
- if (computeNodeListNextOptions != null) {
- clientRequestId = computeNodeListNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (computeNodeListNextOptions != null) {
- returnClientRequestId = computeNodeListNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (computeNodeListNextOptions != null) {
- ocpDate = computeNodeListNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2912,7 +2478,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listNextAsync(result.getBody().getNextPageLink(), computeNodeListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperationsImpl.java
index c3e476d68c46..455fb74a2c3a 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperationsImpl.java
@@ -154,25 +154,9 @@ public ServiceResponseWithHeaders deleteFromTas
final Boolean recursive = null;
final FileDeleteFromTaskOptions fileDeleteFromTaskOptions = null;
Integer timeout = null;
- if (fileDeleteFromTaskOptions != null) {
- timeout = fileDeleteFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileDeleteFromTaskOptions != null) {
- clientRequestId = fileDeleteFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileDeleteFromTaskOptions != null) {
- returnClientRequestId = fileDeleteFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileDeleteFromTaskOptions != null) {
- ocpDate = fileDeleteFromTaskOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteFromTask(jobId, taskId, fileName, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return deleteFromTaskDelegate(call.execute());
}
@@ -210,25 +194,9 @@ public ServiceCall deleteFromTaskAsync(String jobId, String taskId, String fileN
final Boolean recursive = null;
final FileDeleteFromTaskOptions fileDeleteFromTaskOptions = null;
Integer timeout = null;
- if (fileDeleteFromTaskOptions != null) {
- timeout = fileDeleteFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileDeleteFromTaskOptions != null) {
- clientRequestId = fileDeleteFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileDeleteFromTaskOptions != null) {
- returnClientRequestId = fileDeleteFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileDeleteFromTaskOptions != null) {
- ocpDate = fileDeleteFromTaskOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteFromTask(jobId, taskId, fileName, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -396,45 +364,12 @@ public ServiceResponseWithHeaders getFromTa
}
final FileGetFromTaskOptions fileGetFromTaskOptions = null;
Integer timeout = null;
- if (fileGetFromTaskOptions != null) {
- timeout = fileGetFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetFromTaskOptions != null) {
- clientRequestId = fileGetFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetFromTaskOptions != null) {
- returnClientRequestId = fileGetFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetFromTaskOptions != null) {
- ocpDate = fileGetFromTaskOptions.getOcpDate();
- }
- String ocpRange = null;
- if (fileGetFromTaskOptions != null) {
- ocpRange = fileGetFromTaskOptions.getOcpRange();
- }
- DateTime ifModifiedSince = null;
- if (fileGetFromTaskOptions != null) {
- ifModifiedSince = fileGetFromTaskOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetFromTaskOptions != null) {
- ifUnmodifiedSince = fileGetFromTaskOptions.getIfUnmodifiedSince();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ String ocpRange = null;
DateTimeRfc1123 ifModifiedSinceConverted = null;
- if (ifModifiedSince != null) {
- ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
- }
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
- if (ifUnmodifiedSince != null) {
- ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
- }
Call call = service.getFromTask(jobId, taskId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ocpRange, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return getFromTaskDelegate(call.execute());
}
@@ -471,45 +406,12 @@ public ServiceCall getFromTaskAsync(String jobId, String taskId, String fileName
}
final FileGetFromTaskOptions fileGetFromTaskOptions = null;
Integer timeout = null;
- if (fileGetFromTaskOptions != null) {
- timeout = fileGetFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetFromTaskOptions != null) {
- clientRequestId = fileGetFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetFromTaskOptions != null) {
- returnClientRequestId = fileGetFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetFromTaskOptions != null) {
- ocpDate = fileGetFromTaskOptions.getOcpDate();
- }
- String ocpRange = null;
- if (fileGetFromTaskOptions != null) {
- ocpRange = fileGetFromTaskOptions.getOcpRange();
- }
- DateTime ifModifiedSince = null;
- if (fileGetFromTaskOptions != null) {
- ifModifiedSince = fileGetFromTaskOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetFromTaskOptions != null) {
- ifUnmodifiedSince = fileGetFromTaskOptions.getIfUnmodifiedSince();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ String ocpRange = null;
DateTimeRfc1123 ifModifiedSinceConverted = null;
- if (ifModifiedSince != null) {
- ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
- }
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
- if (ifUnmodifiedSince != null) {
- ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
- }
Call call = service.getFromTask(jobId, taskId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ocpRange, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -715,41 +617,11 @@ public ServiceResponseWithHeaders call = service.getNodeFilePropertiesFromTask(jobId, taskId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return getNodeFilePropertiesFromTaskDelegate(call.execute());
}
@@ -786,41 +658,11 @@ public ServiceCall getNodeFilePropertiesFromTaskAsync(String jobId, String taskI
}
final FileGetNodeFilePropertiesFromTaskOptions fileGetNodeFilePropertiesFromTaskOptions = null;
Integer timeout = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- timeout = fileGetNodeFilePropertiesFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- clientRequestId = fileGetNodeFilePropertiesFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- returnClientRequestId = fileGetNodeFilePropertiesFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- ocpDate = fileGetNodeFilePropertiesFromTaskOptions.getOcpDate();
- }
- DateTime ifModifiedSince = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- ifModifiedSince = fileGetNodeFilePropertiesFromTaskOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetNodeFilePropertiesFromTaskOptions != null) {
- ifUnmodifiedSince = fileGetNodeFilePropertiesFromTaskOptions.getIfUnmodifiedSince();
- }
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 call = service.getNodeFilePropertiesFromTask(jobId, taskId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseEmptyCallback(serviceCallback) {
@@ -1019,25 +861,9 @@ public ServiceResponseWithHeaders delete
final Boolean recursive = null;
final FileDeleteFromComputeNodeOptions fileDeleteFromComputeNodeOptions = null;
Integer timeout = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- timeout = fileDeleteFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- clientRequestId = fileDeleteFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- returnClientRequestId = fileDeleteFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- ocpDate = fileDeleteFromComputeNodeOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteFromComputeNode(poolId, nodeId, fileName, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return deleteFromComputeNodeDelegate(call.execute());
}
@@ -1075,25 +901,9 @@ public ServiceCall deleteFromComputeNodeAsync(String poolId, String nodeId, Stri
final Boolean recursive = null;
final FileDeleteFromComputeNodeOptions fileDeleteFromComputeNodeOptions = null;
Integer timeout = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- timeout = fileDeleteFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- clientRequestId = fileDeleteFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- returnClientRequestId = fileDeleteFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileDeleteFromComputeNodeOptions != null) {
- ocpDate = fileDeleteFromComputeNodeOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.deleteFromComputeNode(poolId, nodeId, fileName, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1261,45 +1071,12 @@ public ServiceResponseWithHeaders ge
}
final FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions = null;
Integer timeout = null;
- if (fileGetFromComputeNodeOptions != null) {
- timeout = fileGetFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetFromComputeNodeOptions != null) {
- clientRequestId = fileGetFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetFromComputeNodeOptions != null) {
- returnClientRequestId = fileGetFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetFromComputeNodeOptions != null) {
- ocpDate = fileGetFromComputeNodeOptions.getOcpDate();
- }
- String ocpRange = null;
- if (fileGetFromComputeNodeOptions != null) {
- ocpRange = fileGetFromComputeNodeOptions.getOcpRange();
- }
- DateTime ifModifiedSince = null;
- if (fileGetFromComputeNodeOptions != null) {
- ifModifiedSince = fileGetFromComputeNodeOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetFromComputeNodeOptions != null) {
- ifUnmodifiedSince = fileGetFromComputeNodeOptions.getIfUnmodifiedSince();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ String ocpRange = null;
DateTimeRfc1123 ifModifiedSinceConverted = null;
- if (ifModifiedSince != null) {
- ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
- }
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
- if (ifUnmodifiedSince != null) {
- ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
- }
Call call = service.getFromComputeNode(poolId, nodeId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ocpRange, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return getFromComputeNodeDelegate(call.execute());
}
@@ -1336,45 +1113,12 @@ public ServiceCall getFromComputeNodeAsync(String poolId, String nodeId, String
}
final FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions = null;
Integer timeout = null;
- if (fileGetFromComputeNodeOptions != null) {
- timeout = fileGetFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetFromComputeNodeOptions != null) {
- clientRequestId = fileGetFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetFromComputeNodeOptions != null) {
- returnClientRequestId = fileGetFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetFromComputeNodeOptions != null) {
- ocpDate = fileGetFromComputeNodeOptions.getOcpDate();
- }
- String ocpRange = null;
- if (fileGetFromComputeNodeOptions != null) {
- ocpRange = fileGetFromComputeNodeOptions.getOcpRange();
- }
- DateTime ifModifiedSince = null;
- if (fileGetFromComputeNodeOptions != null) {
- ifModifiedSince = fileGetFromComputeNodeOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetFromComputeNodeOptions != null) {
- ifUnmodifiedSince = fileGetFromComputeNodeOptions.getIfUnmodifiedSince();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ String ocpRange = null;
DateTimeRfc1123 ifModifiedSinceConverted = null;
- if (ifModifiedSince != null) {
- ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
- }
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
- if (ifUnmodifiedSince != null) {
- ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
- }
Call call = service.getFromComputeNode(poolId, nodeId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ocpRange, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1580,41 +1324,11 @@ public ServiceResponseWithHeaders call = service.getNodeFilePropertiesFromComputeNode(poolId, nodeId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return getNodeFilePropertiesFromComputeNodeDelegate(call.execute());
}
@@ -1651,41 +1365,11 @@ public ServiceCall getNodeFilePropertiesFromComputeNodeAsync(String poolId, Stri
}
final FileGetNodeFilePropertiesFromComputeNodeOptions fileGetNodeFilePropertiesFromComputeNodeOptions = null;
Integer timeout = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- timeout = fileGetNodeFilePropertiesFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- clientRequestId = fileGetNodeFilePropertiesFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- returnClientRequestId = fileGetNodeFilePropertiesFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- ocpDate = fileGetNodeFilePropertiesFromComputeNodeOptions.getOcpDate();
- }
- DateTime ifModifiedSince = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- ifModifiedSince = fileGetNodeFilePropertiesFromComputeNodeOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (fileGetNodeFilePropertiesFromComputeNodeOptions != null) {
- ifUnmodifiedSince = fileGetNodeFilePropertiesFromComputeNodeOptions.getIfUnmodifiedSince();
- }
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 call = service.getNodeFilePropertiesFromComputeNode(poolId, nodeId, fileName, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseEmptyCallback(serviceCallback) {
@@ -1880,46 +1564,17 @@ public ServiceResponseWithHeaders, FileListFromTaskHeaders>
final Boolean recursive = null;
final FileListFromTaskOptions fileListFromTaskOptions = null;
String filter = null;
- if (fileListFromTaskOptions != null) {
- filter = fileListFromTaskOptions.getFilter();
- }
Integer maxResults = null;
- if (fileListFromTaskOptions != null) {
- maxResults = fileListFromTaskOptions.getMaxResults();
- }
Integer timeout = null;
- if (fileListFromTaskOptions != null) {
- timeout = fileListFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileListFromTaskOptions != null) {
- clientRequestId = fileListFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromTaskOptions != null) {
- returnClientRequestId = fileListFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromTaskOptions != null) {
- ocpDate = fileListFromTaskOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromTask(jobId, taskId, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, FileListFromTaskHeaders> response = listFromTaskDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- FileListFromTaskNextOptions fileListFromTaskNextOptions = null;
- if (fileListFromTaskOptions != null) {
- fileListFromTaskNextOptions = new FileListFromTaskNextOptions();
- fileListFromTaskNextOptions.setClientRequestId(fileListFromTaskOptions.getClientRequestId());
- fileListFromTaskNextOptions.setReturnClientRequestId(fileListFromTaskOptions.getReturnClientRequestId());
- fileListFromTaskNextOptions.setOcpDate(fileListFromTaskOptions.getOcpDate());
- }
- return listFromTaskNext(nextPageLink, fileListFromTaskNextOptions).getBody();
+ return listFromTaskNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -1953,33 +1608,11 @@ public ServiceCall listFromTaskAsync(final String jobId, final String taskId, fi
final Boolean recursive = null;
final FileListFromTaskOptions fileListFromTaskOptions = null;
String filter = null;
- if (fileListFromTaskOptions != null) {
- filter = fileListFromTaskOptions.getFilter();
- }
Integer maxResults = null;
- if (fileListFromTaskOptions != null) {
- maxResults = fileListFromTaskOptions.getMaxResults();
- }
Integer timeout = null;
- if (fileListFromTaskOptions != null) {
- timeout = fileListFromTaskOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileListFromTaskOptions != null) {
- clientRequestId = fileListFromTaskOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromTaskOptions != null) {
- returnClientRequestId = fileListFromTaskOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromTaskOptions != null) {
- ocpDate = fileListFromTaskOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromTask(jobId, taskId, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -1990,14 +1623,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- FileListFromTaskNextOptions fileListFromTaskNextOptions = null;
- if (fileListFromTaskOptions != null) {
- fileListFromTaskNextOptions = new FileListFromTaskNextOptions();
- fileListFromTaskNextOptions.setClientRequestId(fileListFromTaskOptions.getClientRequestId());
- fileListFromTaskNextOptions.setReturnClientRequestId(fileListFromTaskOptions.getReturnClientRequestId());
- fileListFromTaskNextOptions.setOcpDate(fileListFromTaskOptions.getOcpDate());
- }
- listFromTaskNextAsync(result.getBody().getNextPageLink(), fileListFromTaskNextOptions, serviceCall, serviceCallback);
+ listFromTaskNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -2193,46 +1819,17 @@ public ServiceResponseWithHeaders, FileListFromComputeNodeHe
final Boolean recursive = null;
final FileListFromComputeNodeOptions fileListFromComputeNodeOptions = null;
String filter = null;
- if (fileListFromComputeNodeOptions != null) {
- filter = fileListFromComputeNodeOptions.getFilter();
- }
Integer maxResults = null;
- if (fileListFromComputeNodeOptions != null) {
- maxResults = fileListFromComputeNodeOptions.getMaxResults();
- }
Integer timeout = null;
- if (fileListFromComputeNodeOptions != null) {
- timeout = fileListFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileListFromComputeNodeOptions != null) {
- clientRequestId = fileListFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromComputeNodeOptions != null) {
- returnClientRequestId = fileListFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromComputeNodeOptions != null) {
- ocpDate = fileListFromComputeNodeOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromComputeNode(poolId, nodeId, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, FileListFromComputeNodeHeaders> response = listFromComputeNodeDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- FileListFromComputeNodeNextOptions fileListFromComputeNodeNextOptions = null;
- if (fileListFromComputeNodeOptions != null) {
- fileListFromComputeNodeNextOptions = new FileListFromComputeNodeNextOptions();
- fileListFromComputeNodeNextOptions.setClientRequestId(fileListFromComputeNodeOptions.getClientRequestId());
- fileListFromComputeNodeNextOptions.setReturnClientRequestId(fileListFromComputeNodeOptions.getReturnClientRequestId());
- fileListFromComputeNodeNextOptions.setOcpDate(fileListFromComputeNodeOptions.getOcpDate());
- }
- return listFromComputeNodeNext(nextPageLink, fileListFromComputeNodeNextOptions).getBody();
+ return listFromComputeNodeNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -2266,33 +1863,11 @@ public ServiceCall listFromComputeNodeAsync(final String poolId, final String no
final Boolean recursive = null;
final FileListFromComputeNodeOptions fileListFromComputeNodeOptions = null;
String filter = null;
- if (fileListFromComputeNodeOptions != null) {
- filter = fileListFromComputeNodeOptions.getFilter();
- }
Integer maxResults = null;
- if (fileListFromComputeNodeOptions != null) {
- maxResults = fileListFromComputeNodeOptions.getMaxResults();
- }
Integer timeout = null;
- if (fileListFromComputeNodeOptions != null) {
- timeout = fileListFromComputeNodeOptions.getTimeout();
- }
String clientRequestId = null;
- if (fileListFromComputeNodeOptions != null) {
- clientRequestId = fileListFromComputeNodeOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromComputeNodeOptions != null) {
- returnClientRequestId = fileListFromComputeNodeOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromComputeNodeOptions != null) {
- ocpDate = fileListFromComputeNodeOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromComputeNode(poolId, nodeId, recursive, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2303,14 +1878,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- FileListFromComputeNodeNextOptions fileListFromComputeNodeNextOptions = null;
- if (fileListFromComputeNodeOptions != null) {
- fileListFromComputeNodeNextOptions = new FileListFromComputeNodeNextOptions();
- fileListFromComputeNodeNextOptions.setClientRequestId(fileListFromComputeNodeOptions.getClientRequestId());
- fileListFromComputeNodeNextOptions.setReturnClientRequestId(fileListFromComputeNodeOptions.getReturnClientRequestId());
- fileListFromComputeNodeNextOptions.setOcpDate(fileListFromComputeNodeOptions.getOcpDate());
- }
- listFromComputeNodeNextAsync(result.getBody().getNextPageLink(), fileListFromComputeNodeNextOptions, serviceCall, serviceCallback);
+ listFromComputeNodeNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -2498,21 +2066,8 @@ public ServiceResponseWithHeaders, FileListFromTaskHeaders> l
}
final FileListFromTaskNextOptions fileListFromTaskNextOptions = null;
String clientRequestId = null;
- if (fileListFromTaskNextOptions != null) {
- clientRequestId = fileListFromTaskNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromTaskNextOptions != null) {
- returnClientRequestId = fileListFromTaskNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromTaskNextOptions != null) {
- ocpDate = fileListFromTaskNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromTaskNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listFromTaskNextDelegate(call.execute());
}
@@ -2536,21 +2091,8 @@ public ServiceCall listFromTaskNextAsync(final String nextPageLink, final Servic
}
final FileListFromTaskNextOptions fileListFromTaskNextOptions = null;
String clientRequestId = null;
- if (fileListFromTaskNextOptions != null) {
- clientRequestId = fileListFromTaskNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromTaskNextOptions != null) {
- returnClientRequestId = fileListFromTaskNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromTaskNextOptions != null) {
- ocpDate = fileListFromTaskNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromTaskNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2561,7 +2103,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listFromTaskNextAsync(result.getBody().getNextPageLink(), fileListFromTaskNextOptions, serviceCall, serviceCallback);
+ listFromTaskNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -2687,21 +2229,8 @@ public ServiceResponseWithHeaders, FileListFromComputeNodeHea
}
final FileListFromComputeNodeNextOptions fileListFromComputeNodeNextOptions = null;
String clientRequestId = null;
- if (fileListFromComputeNodeNextOptions != null) {
- clientRequestId = fileListFromComputeNodeNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromComputeNodeNextOptions != null) {
- returnClientRequestId = fileListFromComputeNodeNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromComputeNodeNextOptions != null) {
- ocpDate = fileListFromComputeNodeNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromComputeNodeNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listFromComputeNodeNextDelegate(call.execute());
}
@@ -2725,21 +2254,8 @@ public ServiceCall listFromComputeNodeNextAsync(final String nextPageLink, final
}
final FileListFromComputeNodeNextOptions fileListFromComputeNodeNextOptions = null;
String clientRequestId = null;
- if (fileListFromComputeNodeNextOptions != null) {
- clientRequestId = fileListFromComputeNodeNextOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (fileListFromComputeNodeNextOptions != null) {
- returnClientRequestId = fileListFromComputeNodeNextOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (fileListFromComputeNodeNextOptions != null) {
- ocpDate = fileListFromComputeNodeNextOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.listFromComputeNodeNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
serviceCall.newCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2750,7 +2266,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- listFromComputeNodeNextAsync(result.getBody().getNextPageLink(), fileListFromComputeNodeNextOptions, serviceCall, serviceCallback);
+ listFromComputeNodeNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperationsImpl.java
index d0ebfd0c804a..04390a8933af 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperationsImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperationsImpl.java
@@ -176,25 +176,9 @@ public ServiceResponseWithHeaders call = service.getAllJobsLifetimeStatistics(this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getAllJobsLifetimeStatisticsDelegate(call.execute());
}
@@ -216,25 +200,9 @@ public ServiceCall getAllJobsLifetimeStatisticsAsync(final ServiceCallback call = service.getAllJobsLifetimeStatistics(this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -365,49 +333,13 @@ public ServiceResponseWithHeaders delete(String jobId) t
}
final JobDeleteOptions jobDeleteOptions = null;
Integer timeout = null;
- if (jobDeleteOptions != null) {
- timeout = jobDeleteOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobDeleteOptions != null) {
- clientRequestId = jobDeleteOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobDeleteOptions != null) {
- returnClientRequestId = jobDeleteOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobDeleteOptions != null) {
- ocpDate = jobDeleteOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobDeleteOptions != null) {
- ifMatch = jobDeleteOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobDeleteOptions != null) {
- ifNoneMatch = jobDeleteOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobDeleteOptions != null) {
- ifModifiedSince = jobDeleteOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobDeleteOptions != null) {
- ifUnmodifiedSince = jobDeleteOptions.getIfUnmodifiedSince();
- }
- 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 call = service.delete(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return deleteDelegate(call.execute());
}
@@ -434,49 +366,13 @@ public ServiceCall deleteAsync(String jobId, final ServiceCallback service
}
final JobDeleteOptions jobDeleteOptions = null;
Integer timeout = null;
- if (jobDeleteOptions != null) {
- timeout = jobDeleteOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobDeleteOptions != null) {
- clientRequestId = jobDeleteOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobDeleteOptions != null) {
- returnClientRequestId = jobDeleteOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobDeleteOptions != null) {
- ocpDate = jobDeleteOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobDeleteOptions != null) {
- ifMatch = jobDeleteOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobDeleteOptions != null) {
- ifNoneMatch = jobDeleteOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobDeleteOptions != null) {
- ifModifiedSince = jobDeleteOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobDeleteOptions != null) {
- ifUnmodifiedSince = jobDeleteOptions.getIfUnmodifiedSince();
- }
- 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 call = service.delete(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -664,33 +560,11 @@ public ServiceResponseWithHeaders get(String jobId) thr
}
final JobGetOptions jobGetOptions = null;
String select = null;
- if (jobGetOptions != null) {
- select = jobGetOptions.getSelect();
- }
String expand = null;
- if (jobGetOptions != null) {
- expand = jobGetOptions.getExpand();
- }
Integer timeout = null;
- if (jobGetOptions != null) {
- timeout = jobGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobGetOptions != null) {
- clientRequestId = jobGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobGetOptions != null) {
- returnClientRequestId = jobGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobGetOptions != null) {
- ocpDate = jobGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getDelegate(call.execute());
}
@@ -717,33 +591,11 @@ public ServiceCall getAsync(String jobId, final ServiceCallback servic
}
final JobGetOptions jobGetOptions = null;
String select = null;
- if (jobGetOptions != null) {
- select = jobGetOptions.getSelect();
- }
String expand = null;
- if (jobGetOptions != null) {
- expand = jobGetOptions.getExpand();
- }
Integer timeout = null;
- if (jobGetOptions != null) {
- timeout = jobGetOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobGetOptions != null) {
- clientRequestId = jobGetOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobGetOptions != null) {
- returnClientRequestId = jobGetOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobGetOptions != null) {
- ocpDate = jobGetOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.get(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -904,49 +756,13 @@ public ServiceResponseWithHeaders patch(String jobId, Job
Validator.validate(jobPatchParameter);
final JobPatchOptions jobPatchOptions = null;
Integer timeout = null;
- if (jobPatchOptions != null) {
- timeout = jobPatchOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobPatchOptions != null) {
- clientRequestId = jobPatchOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobPatchOptions != null) {
- returnClientRequestId = jobPatchOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobPatchOptions != null) {
- ocpDate = jobPatchOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobPatchOptions != null) {
- ifMatch = jobPatchOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobPatchOptions != null) {
- ifNoneMatch = jobPatchOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobPatchOptions != null) {
- ifModifiedSince = jobPatchOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobPatchOptions != null) {
- ifUnmodifiedSince = jobPatchOptions.getIfUnmodifiedSince();
- }
- 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 call = service.patch(jobId, jobPatchParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return patchDelegate(call.execute());
}
@@ -979,49 +795,13 @@ public ServiceCall patchAsync(String jobId, JobPatchParameter jobPatchParameter,
Validator.validate(jobPatchParameter, serviceCallback);
final JobPatchOptions jobPatchOptions = null;
Integer timeout = null;
- if (jobPatchOptions != null) {
- timeout = jobPatchOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobPatchOptions != null) {
- clientRequestId = jobPatchOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobPatchOptions != null) {
- returnClientRequestId = jobPatchOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobPatchOptions != null) {
- ocpDate = jobPatchOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobPatchOptions != null) {
- ifMatch = jobPatchOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobPatchOptions != null) {
- ifNoneMatch = jobPatchOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobPatchOptions != null) {
- ifModifiedSince = jobPatchOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobPatchOptions != null) {
- ifUnmodifiedSince = jobPatchOptions.getIfUnmodifiedSince();
- }
- 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 call = service.patch(jobId, jobPatchParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1225,49 +1005,13 @@ public ServiceResponseWithHeaders update(String jobId, J
Validator.validate(jobUpdateParameter);
final JobUpdateOptions jobUpdateOptions = null;
Integer timeout = null;
- if (jobUpdateOptions != null) {
- timeout = jobUpdateOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobUpdateOptions != null) {
- clientRequestId = jobUpdateOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobUpdateOptions != null) {
- returnClientRequestId = jobUpdateOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobUpdateOptions != null) {
- ocpDate = jobUpdateOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobUpdateOptions != null) {
- ifMatch = jobUpdateOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobUpdateOptions != null) {
- ifNoneMatch = jobUpdateOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobUpdateOptions != null) {
- ifModifiedSince = jobUpdateOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobUpdateOptions != null) {
- ifUnmodifiedSince = jobUpdateOptions.getIfUnmodifiedSince();
- }
- 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 call = service.update(jobId, jobUpdateParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return updateDelegate(call.execute());
}
@@ -1300,49 +1044,13 @@ public ServiceCall updateAsync(String jobId, JobUpdateParameter jobUpdateParamet
Validator.validate(jobUpdateParameter, serviceCallback);
final JobUpdateOptions jobUpdateOptions = null;
Integer timeout = null;
- if (jobUpdateOptions != null) {
- timeout = jobUpdateOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobUpdateOptions != null) {
- clientRequestId = jobUpdateOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobUpdateOptions != null) {
- returnClientRequestId = jobUpdateOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobUpdateOptions != null) {
- ocpDate = jobUpdateOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobUpdateOptions != null) {
- ifMatch = jobUpdateOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobUpdateOptions != null) {
- ifNoneMatch = jobUpdateOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobUpdateOptions != null) {
- ifModifiedSince = jobUpdateOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobUpdateOptions != null) {
- ifUnmodifiedSince = jobUpdateOptions.getIfUnmodifiedSince();
- }
- 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 call = service.update(jobId, jobUpdateParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1545,51 +1253,15 @@ public ServiceResponseWithHeaders disable(String jobId,
}
final JobDisableOptions jobDisableOptions = null;
Integer timeout = null;
- if (jobDisableOptions != null) {
- timeout = jobDisableOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobDisableOptions != null) {
- clientRequestId = jobDisableOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobDisableOptions != null) {
- returnClientRequestId = jobDisableOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobDisableOptions != null) {
- ocpDate = jobDisableOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobDisableOptions != null) {
- ifMatch = jobDisableOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobDisableOptions != null) {
- ifNoneMatch = jobDisableOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobDisableOptions != null) {
- ifModifiedSince = jobDisableOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobDisableOptions != null) {
- ifUnmodifiedSince = jobDisableOptions.getIfUnmodifiedSince();
- }
- JobDisableParameter jobDisableParameter = new JobDisableParameter();
- jobDisableParameter.setDisableTasks(disableTasks);
- 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);
- }
+ JobDisableParameter jobDisableParameter = new JobDisableParameter();
+ jobDisableParameter.setDisableTasks(disableTasks);
Call call = service.disable(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, jobDisableParameter);
return disableDelegate(call.execute());
}
@@ -1615,57 +1287,21 @@ public ServiceCall disableAsync(String jobId, DisableJobOption disableTasks, fin
serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."));
return null;
}
- if (disableTasks == null) {
- serviceCallback.failure(new IllegalArgumentException("Parameter disableTasks is required and cannot be null."));
- return null;
- }
- final JobDisableOptions jobDisableOptions = null;
- Integer timeout = null;
- if (jobDisableOptions != null) {
- timeout = jobDisableOptions.getTimeout();
- }
- String clientRequestId = null;
- if (jobDisableOptions != null) {
- clientRequestId = jobDisableOptions.getClientRequestId();
- }
- Boolean returnClientRequestId = null;
- if (jobDisableOptions != null) {
- returnClientRequestId = jobDisableOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobDisableOptions != null) {
- ocpDate = jobDisableOptions.getOcpDate();
- }
- String ifMatch = null;
- if (jobDisableOptions != null) {
- ifMatch = jobDisableOptions.getIfMatch();
- }
- String ifNoneMatch = null;
- if (jobDisableOptions != null) {
- ifNoneMatch = jobDisableOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobDisableOptions != null) {
- ifModifiedSince = jobDisableOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobDisableOptions != null) {
- ifUnmodifiedSince = jobDisableOptions.getIfUnmodifiedSince();
+ if (disableTasks == null) {
+ serviceCallback.failure(new IllegalArgumentException("Parameter disableTasks is required and cannot be null."));
+ return null;
}
- JobDisableParameter jobDisableParameter = new JobDisableParameter();
- jobDisableParameter.setDisableTasks(disableTasks);
+ final JobDisableOptions jobDisableOptions = null;
+ Integer timeout = null;
+ String clientRequestId = null;
+ Boolean returnClientRequestId = null;
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
+ String ifMatch = null;
+ String ifNoneMatch = null;
DateTimeRfc1123 ifModifiedSinceConverted = null;
- if (ifModifiedSince != null) {
- ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
- }
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
- if (ifUnmodifiedSince != null) {
- ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
- }
+ JobDisableParameter jobDisableParameter = new JobDisableParameter();
+ jobDisableParameter.setDisableTasks(disableTasks);
Call call = service.disable(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, jobDisableParameter);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -1866,49 +1502,13 @@ public ServiceResponseWithHeaders enable(String jobId) t
}
final JobEnableOptions jobEnableOptions = null;
Integer timeout = null;
- if (jobEnableOptions != null) {
- timeout = jobEnableOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobEnableOptions != null) {
- clientRequestId = jobEnableOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobEnableOptions != null) {
- returnClientRequestId = jobEnableOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobEnableOptions != null) {
- ocpDate = jobEnableOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobEnableOptions != null) {
- ifMatch = jobEnableOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobEnableOptions != null) {
- ifNoneMatch = jobEnableOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobEnableOptions != null) {
- ifModifiedSince = jobEnableOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobEnableOptions != null) {
- ifUnmodifiedSince = jobEnableOptions.getIfUnmodifiedSince();
- }
- 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 call = service.enable(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
return enableDelegate(call.execute());
}
@@ -1935,49 +1535,13 @@ public ServiceCall enableAsync(String jobId, final ServiceCallback service
}
final JobEnableOptions jobEnableOptions = null;
Integer timeout = null;
- if (jobEnableOptions != null) {
- timeout = jobEnableOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobEnableOptions != null) {
- clientRequestId = jobEnableOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobEnableOptions != null) {
- returnClientRequestId = jobEnableOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobEnableOptions != null) {
- ocpDate = jobEnableOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobEnableOptions != null) {
- ifMatch = jobEnableOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobEnableOptions != null) {
- ifNoneMatch = jobEnableOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobEnableOptions != null) {
- ifModifiedSince = jobEnableOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobEnableOptions != null) {
- ifUnmodifiedSince = jobEnableOptions.getIfUnmodifiedSince();
- }
- 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 call = service.enable(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2166,54 +1730,15 @@ public ServiceResponseWithHeaders terminate(String jo
final String terminateReason = null;
final JobTerminateOptions jobTerminateOptions = null;
Integer timeout = null;
- if (jobTerminateOptions != null) {
- timeout = jobTerminateOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobTerminateOptions != null) {
- clientRequestId = jobTerminateOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobTerminateOptions != null) {
- returnClientRequestId = jobTerminateOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobTerminateOptions != null) {
- ocpDate = jobTerminateOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobTerminateOptions != null) {
- ifMatch = jobTerminateOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobTerminateOptions != null) {
- ifNoneMatch = jobTerminateOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobTerminateOptions != null) {
- ifModifiedSince = jobTerminateOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobTerminateOptions != null) {
- ifUnmodifiedSince = jobTerminateOptions.getIfUnmodifiedSince();
- }
- JobTerminateParameter jobTerminateParameter = null;
- if (terminateReason != null) {
- jobTerminateParameter = new JobTerminateParameter();
- jobTerminateParameter.setTerminateReason(terminateReason);
- }
- 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);
- }
+ JobTerminateParameter jobTerminateParameter = new JobTerminateParameter();
+ jobTerminateParameter = null;
Call call = service.terminate(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, jobTerminateParameter);
return terminateDelegate(call.execute());
}
@@ -2241,54 +1766,15 @@ public ServiceCall terminateAsync(String jobId, final ServiceCallback serv
final String terminateReason = null;
final JobTerminateOptions jobTerminateOptions = null;
Integer timeout = null;
- if (jobTerminateOptions != null) {
- timeout = jobTerminateOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobTerminateOptions != null) {
- clientRequestId = jobTerminateOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobTerminateOptions != null) {
- returnClientRequestId = jobTerminateOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobTerminateOptions != null) {
- ocpDate = jobTerminateOptions.getOcpDate();
- }
+ DateTimeRfc1123 ocpDateConverted = null;
String ifMatch = null;
- if (jobTerminateOptions != null) {
- ifMatch = jobTerminateOptions.getIfMatch();
- }
String ifNoneMatch = null;
- if (jobTerminateOptions != null) {
- ifNoneMatch = jobTerminateOptions.getIfNoneMatch();
- }
- DateTime ifModifiedSince = null;
- if (jobTerminateOptions != null) {
- ifModifiedSince = jobTerminateOptions.getIfModifiedSince();
- }
- DateTime ifUnmodifiedSince = null;
- if (jobTerminateOptions != null) {
- ifUnmodifiedSince = jobTerminateOptions.getIfUnmodifiedSince();
- }
- JobTerminateParameter jobTerminateParameter = null;
- if (terminateReason != null) {
- jobTerminateParameter = new JobTerminateParameter();
- jobTerminateParameter.setTerminateReason(terminateReason);
- }
- 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);
- }
+ JobTerminateParameter jobTerminateParameter = new JobTerminateParameter();
+ jobTerminateParameter = null;
Call call = service.terminate(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, jobTerminateParameter);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2489,25 +1975,9 @@ public ServiceResponseWithHeaders add(JobAddParameter job)
Validator.validate(job);
final JobAddOptions jobAddOptions = null;
Integer timeout = null;
- if (jobAddOptions != null) {
- timeout = jobAddOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobAddOptions != null) {
- clientRequestId = jobAddOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobAddOptions != null) {
- returnClientRequestId = jobAddOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobAddOptions != null) {
- ocpDate = jobAddOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.add(job, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return addDelegate(call.execute());
}
@@ -2535,25 +2005,9 @@ public ServiceCall addAsync(JobAddParameter job, final ServiceCallback ser
Validator.validate(job, serviceCallback);
final JobAddOptions jobAddOptions = null;
Integer timeout = null;
- if (jobAddOptions != null) {
- timeout = jobAddOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobAddOptions != null) {
- clientRequestId = jobAddOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobAddOptions != null) {
- returnClientRequestId = jobAddOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobAddOptions != null) {
- ocpDate = jobAddOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.add(job, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback(serviceCallback) {
@@ -2691,54 +2145,19 @@ public ServiceResponseWithHeaders, JobListHeaders> list() th
}
final JobListOptions jobListOptions = null;
String filter = null;
- if (jobListOptions != null) {
- filter = jobListOptions.getFilter();
- }
String select = null;
- if (jobListOptions != null) {
- select = jobListOptions.getSelect();
- }
String expand = null;
- if (jobListOptions != null) {
- expand = jobListOptions.getExpand();
- }
Integer maxResults = null;
- if (jobListOptions != null) {
- maxResults = jobListOptions.getMaxResults();
- }
Integer timeout = null;
- if (jobListOptions != null) {
- timeout = jobListOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobListOptions != null) {
- clientRequestId = jobListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobListOptions != null) {
- returnClientRequestId = jobListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobListOptions != null) {
- ocpDate = jobListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, expand, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
ServiceResponseWithHeaders, JobListHeaders> response = listDelegate(call.execute());
PagedList result = new PagedList(response.getBody()) {
@Override
- public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
- JobListNextOptions jobListNextOptions = null;
- if (jobListOptions != null) {
- jobListNextOptions = new JobListNextOptions();
- jobListNextOptions.setClientRequestId(jobListOptions.getClientRequestId());
- jobListNextOptions.setReturnClientRequestId(jobListOptions.getReturnClientRequestId());
- jobListNextOptions.setOcpDate(jobListOptions.getOcpDate());
- }
- return listNext(nextPageLink, jobListNextOptions).getBody();
+ public Page nextPage(String nextPageLink) throws BatchErrorException, IOException {
+ return listNext(nextPageLink, null).getBody();
}
};
return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse());
@@ -2761,41 +2180,13 @@ public ServiceCall listAsync(final ListOperationCallback serviceCallba
}
final JobListOptions jobListOptions = null;
String filter = null;
- if (jobListOptions != null) {
- filter = jobListOptions.getFilter();
- }
String select = null;
- if (jobListOptions != null) {
- select = jobListOptions.getSelect();
- }
String expand = null;
- if (jobListOptions != null) {
- expand = jobListOptions.getExpand();
- }
Integer maxResults = null;
- if (jobListOptions != null) {
- maxResults = jobListOptions.getMaxResults();
- }
Integer timeout = null;
- if (jobListOptions != null) {
- timeout = jobListOptions.getTimeout();
- }
String clientRequestId = null;
- if (jobListOptions != null) {
- clientRequestId = jobListOptions.getClientRequestId();
- }
Boolean returnClientRequestId = null;
- if (jobListOptions != null) {
- returnClientRequestId = jobListOptions.getReturnClientRequestId();
- }
- DateTime ocpDate = null;
- if (jobListOptions != null) {
- ocpDate = jobListOptions.getOcpDate();
- }
DateTimeRfc1123 ocpDateConverted = null;
- if (ocpDate != null) {
- ocpDateConverted = new DateTimeRfc1123(ocpDate);
- }
Call call = service.list(this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, expand, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback>(serviceCallback) {
@@ -2806,14 +2197,7 @@ public void onResponse(Call call, Response response)
serviceCallback.load(result.getBody().getItems());
if (result.getBody().getNextPageLink() != null
&& serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) {
- JobListNextOptions jobListNextOptions = null;
- if (jobListOptions != null) {
- jobListNextOptions = new JobListNextOptions();
- jobListNextOptions.setClientRequestId(jobListOptions.getClientRequestId());
- jobListNextOptions.setReturnClientRequestId(jobListOptions.getReturnClientRequestId());
- jobListNextOptions.setOcpDate(jobListOptions.getOcpDate());
- }
- listNextAsync(result.getBody().getNextPageLink(), jobListNextOptions, serviceCall, serviceCallback);
+ listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback);
} else {
serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse()));
}
@@ -3000,54 +2384,19 @@ public ServiceResponseWithHeaders