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, JobListFromJobScheduleHea } final JobListFromJobScheduleOptions jobListFromJobScheduleOptions = null; String filter = null; - if (jobListFromJobScheduleOptions != null) { - filter = jobListFromJobScheduleOptions.getFilter(); - } String select = null; - if (jobListFromJobScheduleOptions != null) { - select = jobListFromJobScheduleOptions.getSelect(); - } String expand = null; - if (jobListFromJobScheduleOptions != null) { - expand = jobListFromJobScheduleOptions.getExpand(); - } Integer maxResults = null; - if (jobListFromJobScheduleOptions != null) { - maxResults = jobListFromJobScheduleOptions.getMaxResults(); - } Integer timeout = null; - if (jobListFromJobScheduleOptions != null) { - timeout = jobListFromJobScheduleOptions.getTimeout(); - } String clientRequestId = null; - if (jobListFromJobScheduleOptions != null) { - clientRequestId = jobListFromJobScheduleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListFromJobScheduleOptions != null) { - returnClientRequestId = jobListFromJobScheduleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListFromJobScheduleOptions != null) { - ocpDate = jobListFromJobScheduleOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listFromJobSchedule(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, expand, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); ServiceResponseWithHeaders, JobListFromJobScheduleHeaders> response = listFromJobScheduleDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - JobListFromJobScheduleNextOptions jobListFromJobScheduleNextOptions = null; - if (jobListFromJobScheduleOptions != null) { - jobListFromJobScheduleNextOptions = new JobListFromJobScheduleNextOptions(); - jobListFromJobScheduleNextOptions.setClientRequestId(jobListFromJobScheduleOptions.getClientRequestId()); - jobListFromJobScheduleNextOptions.setReturnClientRequestId(jobListFromJobScheduleOptions.getReturnClientRequestId()); - jobListFromJobScheduleNextOptions.setOcpDate(jobListFromJobScheduleOptions.getOcpDate()); - } - return listFromJobScheduleNext(nextPageLink, jobListFromJobScheduleNextOptions).getBody(); + return listFromJobScheduleNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -3075,41 +2424,13 @@ public ServiceCall listFromJobScheduleAsync(final String jobScheduleId, final Li } final JobListFromJobScheduleOptions jobListFromJobScheduleOptions = null; String filter = null; - if (jobListFromJobScheduleOptions != null) { - filter = jobListFromJobScheduleOptions.getFilter(); - } String select = null; - if (jobListFromJobScheduleOptions != null) { - select = jobListFromJobScheduleOptions.getSelect(); - } String expand = null; - if (jobListFromJobScheduleOptions != null) { - expand = jobListFromJobScheduleOptions.getExpand(); - } Integer maxResults = null; - if (jobListFromJobScheduleOptions != null) { - maxResults = jobListFromJobScheduleOptions.getMaxResults(); - } Integer timeout = null; - if (jobListFromJobScheduleOptions != null) { - timeout = jobListFromJobScheduleOptions.getTimeout(); - } String clientRequestId = null; - if (jobListFromJobScheduleOptions != null) { - clientRequestId = jobListFromJobScheduleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListFromJobScheduleOptions != null) { - returnClientRequestId = jobListFromJobScheduleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListFromJobScheduleOptions != null) { - ocpDate = jobListFromJobScheduleOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listFromJobSchedule(jobScheduleId, 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) { @@ -3120,14 +2441,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) { - JobListFromJobScheduleNextOptions jobListFromJobScheduleNextOptions = null; - if (jobListFromJobScheduleOptions != null) { - jobListFromJobScheduleNextOptions = new JobListFromJobScheduleNextOptions(); - jobListFromJobScheduleNextOptions.setClientRequestId(jobListFromJobScheduleOptions.getClientRequestId()); - jobListFromJobScheduleNextOptions.setReturnClientRequestId(jobListFromJobScheduleOptions.getReturnClientRequestId()); - jobListFromJobScheduleNextOptions.setOcpDate(jobListFromJobScheduleOptions.getOcpDate()); - } - listFromJobScheduleNextAsync(result.getBody().getNextPageLink(), jobListFromJobScheduleNextOptions, serviceCall, serviceCallback); + listFromJobScheduleNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -3323,50 +2637,18 @@ public ServiceResponseWithHeaders call = service.listPreparationAndReleaseTaskStatus(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); ServiceResponseWithHeaders, JobListPreparationAndReleaseTaskStatusHeaders> response = listPreparationAndReleaseTaskStatusDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - JobListPreparationAndReleaseTaskStatusNextOptions jobListPreparationAndReleaseTaskStatusNextOptions = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - jobListPreparationAndReleaseTaskStatusNextOptions = new JobListPreparationAndReleaseTaskStatusNextOptions(); - jobListPreparationAndReleaseTaskStatusNextOptions.setClientRequestId(jobListPreparationAndReleaseTaskStatusOptions.getClientRequestId()); - jobListPreparationAndReleaseTaskStatusNextOptions.setReturnClientRequestId(jobListPreparationAndReleaseTaskStatusOptions.getReturnClientRequestId()); - jobListPreparationAndReleaseTaskStatusNextOptions.setOcpDate(jobListPreparationAndReleaseTaskStatusOptions.getOcpDate()); - } - return listPreparationAndReleaseTaskStatusNext(nextPageLink, jobListPreparationAndReleaseTaskStatusNextOptions).getBody(); + return listPreparationAndReleaseTaskStatusNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -3394,37 +2676,12 @@ public ServiceCall listPreparationAndReleaseTaskStatusAsync(final String jobId, } final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions = null; String filter = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - filter = jobListPreparationAndReleaseTaskStatusOptions.getFilter(); - } String select = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - select = jobListPreparationAndReleaseTaskStatusOptions.getSelect(); - } Integer maxResults = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - maxResults = jobListPreparationAndReleaseTaskStatusOptions.getMaxResults(); - } Integer timeout = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - timeout = jobListPreparationAndReleaseTaskStatusOptions.getTimeout(); - } String clientRequestId = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - clientRequestId = jobListPreparationAndReleaseTaskStatusOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - returnClientRequestId = jobListPreparationAndReleaseTaskStatusOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - ocpDate = jobListPreparationAndReleaseTaskStatusOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listPreparationAndReleaseTaskStatus(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @@ -3435,14 +2692,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) { - JobListPreparationAndReleaseTaskStatusNextOptions jobListPreparationAndReleaseTaskStatusNextOptions = null; - if (jobListPreparationAndReleaseTaskStatusOptions != null) { - jobListPreparationAndReleaseTaskStatusNextOptions = new JobListPreparationAndReleaseTaskStatusNextOptions(); - jobListPreparationAndReleaseTaskStatusNextOptions.setClientRequestId(jobListPreparationAndReleaseTaskStatusOptions.getClientRequestId()); - jobListPreparationAndReleaseTaskStatusNextOptions.setReturnClientRequestId(jobListPreparationAndReleaseTaskStatusOptions.getReturnClientRequestId()); - jobListPreparationAndReleaseTaskStatusNextOptions.setOcpDate(jobListPreparationAndReleaseTaskStatusOptions.getOcpDate()); - } - listPreparationAndReleaseTaskStatusNextAsync(result.getBody().getNextPageLink(), jobListPreparationAndReleaseTaskStatusNextOptions, serviceCall, serviceCallback); + listPreparationAndReleaseTaskStatusNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -3627,21 +2877,8 @@ public ServiceResponseWithHeaders, JobListHeaders> listNext(f } final JobListNextOptions jobListNextOptions = null; String clientRequestId = null; - if (jobListNextOptions != null) { - clientRequestId = jobListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListNextOptions != null) { - returnClientRequestId = jobListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListNextOptions != null) { - ocpDate = jobListNextOptions.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()); } @@ -3665,21 +2902,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se } final JobListNextOptions jobListNextOptions = null; String clientRequestId = null; - if (jobListNextOptions != null) { - clientRequestId = jobListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListNextOptions != null) { - returnClientRequestId = jobListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListNextOptions != null) { - ocpDate = jobListNextOptions.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) { @@ -3690,7 +2914,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(), jobListNextOptions, serviceCall, serviceCallback); + listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -3816,21 +3040,8 @@ public ServiceResponseWithHeaders, JobListFromJobScheduleHead } final JobListFromJobScheduleNextOptions jobListFromJobScheduleNextOptions = null; String clientRequestId = null; - if (jobListFromJobScheduleNextOptions != null) { - clientRequestId = jobListFromJobScheduleNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListFromJobScheduleNextOptions != null) { - returnClientRequestId = jobListFromJobScheduleNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListFromJobScheduleNextOptions != null) { - ocpDate = jobListFromJobScheduleNextOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listFromJobScheduleNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); return listFromJobScheduleNextDelegate(call.execute()); } @@ -3854,21 +3065,8 @@ public ServiceCall listFromJobScheduleNextAsync(final String nextPageLink, final } final JobListFromJobScheduleNextOptions jobListFromJobScheduleNextOptions = null; String clientRequestId = null; - if (jobListFromJobScheduleNextOptions != null) { - clientRequestId = jobListFromJobScheduleNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListFromJobScheduleNextOptions != null) { - returnClientRequestId = jobListFromJobScheduleNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListFromJobScheduleNextOptions != null) { - ocpDate = jobListFromJobScheduleNextOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listFromJobScheduleNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); serviceCall.newCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @@ -3879,7 +3077,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) { - listFromJobScheduleNextAsync(result.getBody().getNextPageLink(), jobListFromJobScheduleNextOptions, serviceCall, serviceCallback); + listFromJobScheduleNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -4005,21 +3203,8 @@ public ServiceResponseWithHeaders call = service.listPreparationAndReleaseTaskStatusNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); return listPreparationAndReleaseTaskStatusNextDelegate(call.execute()); } @@ -4043,21 +3228,8 @@ public ServiceCall listPreparationAndReleaseTaskStatusNextAsync(final String nex } final JobListPreparationAndReleaseTaskStatusNextOptions jobListPreparationAndReleaseTaskStatusNextOptions = null; String clientRequestId = null; - if (jobListPreparationAndReleaseTaskStatusNextOptions != null) { - clientRequestId = jobListPreparationAndReleaseTaskStatusNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobListPreparationAndReleaseTaskStatusNextOptions != null) { - returnClientRequestId = jobListPreparationAndReleaseTaskStatusNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobListPreparationAndReleaseTaskStatusNextOptions != null) { - ocpDate = jobListPreparationAndReleaseTaskStatusNextOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listPreparationAndReleaseTaskStatusNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); serviceCall.newCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @@ -4068,7 +3240,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) { - listPreparationAndReleaseTaskStatusNextAsync(result.getBody().getNextPageLink(), jobListPreparationAndReleaseTaskStatusNextOptions, serviceCall, serviceCallback); + listPreparationAndReleaseTaskStatusNextAsync(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/JobScheduleOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperationsImpl.java index c40d37b052fd..8421b5750126 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperationsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperationsImpl.java @@ -155,53 +155,14 @@ public ServiceResponseWithHeaders exists(Stri } final JobScheduleExistsOptions jobScheduleExistsOptions = null; String select = null; - if (jobScheduleExistsOptions != null) { - select = jobScheduleExistsOptions.getSelect(); - } Integer timeout = null; - if (jobScheduleExistsOptions != null) { - timeout = jobScheduleExistsOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleExistsOptions != null) { - clientRequestId = jobScheduleExistsOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleExistsOptions != null) { - returnClientRequestId = jobScheduleExistsOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleExistsOptions != null) { - ocpDate = jobScheduleExistsOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleExistsOptions != null) { - ifMatch = jobScheduleExistsOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleExistsOptions != null) { - ifNoneMatch = jobScheduleExistsOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleExistsOptions != null) { - ifModifiedSince = jobScheduleExistsOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleExistsOptions != null) { - ifUnmodifiedSince = jobScheduleExistsOptions.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.exists(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return existsDelegate(call.execute()); } @@ -228,53 +189,14 @@ public ServiceCall existsAsync(String jobScheduleId, final ServiceCallback call = service.exists(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseEmptyCallback(serviceCallback) { @@ -471,49 +393,13 @@ public ServiceResponseWithHeaders delete(String } final JobScheduleDeleteOptions jobScheduleDeleteOptions = null; Integer timeout = null; - if (jobScheduleDeleteOptions != null) { - timeout = jobScheduleDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleDeleteOptions != null) { - clientRequestId = jobScheduleDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleDeleteOptions != null) { - returnClientRequestId = jobScheduleDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleDeleteOptions != null) { - ocpDate = jobScheduleDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleDeleteOptions != null) { - ifMatch = jobScheduleDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleDeleteOptions != null) { - ifNoneMatch = jobScheduleDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleDeleteOptions != null) { - ifModifiedSince = jobScheduleDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleDeleteOptions != null) { - ifUnmodifiedSince = jobScheduleDeleteOptions.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(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return deleteDelegate(call.execute()); } @@ -540,49 +426,13 @@ public ServiceCall deleteAsync(String jobScheduleId, final ServiceCallback } final JobScheduleDeleteOptions jobScheduleDeleteOptions = null; Integer timeout = null; - if (jobScheduleDeleteOptions != null) { - timeout = jobScheduleDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleDeleteOptions != null) { - clientRequestId = jobScheduleDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleDeleteOptions != null) { - returnClientRequestId = jobScheduleDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleDeleteOptions != null) { - ocpDate = jobScheduleDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleDeleteOptions != null) { - ifMatch = jobScheduleDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleDeleteOptions != null) { - ifNoneMatch = jobScheduleDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleDeleteOptions != null) { - ifModifiedSince = jobScheduleDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleDeleteOptions != null) { - ifUnmodifiedSince = jobScheduleDeleteOptions.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(jobScheduleId, 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) { @@ -770,57 +620,15 @@ public ServiceResponseWithHeaders get(S } final JobScheduleGetOptions jobScheduleGetOptions = null; String select = null; - if (jobScheduleGetOptions != null) { - select = jobScheduleGetOptions.getSelect(); - } String expand = null; - if (jobScheduleGetOptions != null) { - expand = jobScheduleGetOptions.getExpand(); - } Integer timeout = null; - if (jobScheduleGetOptions != null) { - timeout = jobScheduleGetOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleGetOptions != null) { - clientRequestId = jobScheduleGetOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleGetOptions != null) { - returnClientRequestId = jobScheduleGetOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleGetOptions != null) { - ocpDate = jobScheduleGetOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleGetOptions != null) { - ifMatch = jobScheduleGetOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleGetOptions != null) { - ifNoneMatch = jobScheduleGetOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleGetOptions != null) { - ifModifiedSince = jobScheduleGetOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleGetOptions != null) { - ifUnmodifiedSince = jobScheduleGetOptions.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.get(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return getDelegate(call.execute()); } @@ -847,57 +655,15 @@ public ServiceCall getAsync(String jobScheduleId, final ServiceCallback call = service.get(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1106,49 +872,13 @@ public ServiceResponseWithHeaders patch(String jo Validator.validate(jobSchedulePatchParameter); final JobSchedulePatchOptions jobSchedulePatchOptions = null; Integer timeout = null; - if (jobSchedulePatchOptions != null) { - timeout = jobSchedulePatchOptions.getTimeout(); - } String clientRequestId = null; - if (jobSchedulePatchOptions != null) { - clientRequestId = jobSchedulePatchOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobSchedulePatchOptions != null) { - returnClientRequestId = jobSchedulePatchOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobSchedulePatchOptions != null) { - ocpDate = jobSchedulePatchOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobSchedulePatchOptions != null) { - ifMatch = jobSchedulePatchOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobSchedulePatchOptions != null) { - ifNoneMatch = jobSchedulePatchOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobSchedulePatchOptions != null) { - ifModifiedSince = jobSchedulePatchOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobSchedulePatchOptions != null) { - ifUnmodifiedSince = jobSchedulePatchOptions.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(jobScheduleId, jobSchedulePatchParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return patchDelegate(call.execute()); } @@ -1181,49 +911,13 @@ public ServiceCall patchAsync(String jobScheduleId, JobSchedulePatchParameter jo Validator.validate(jobSchedulePatchParameter, serviceCallback); final JobSchedulePatchOptions jobSchedulePatchOptions = null; Integer timeout = null; - if (jobSchedulePatchOptions != null) { - timeout = jobSchedulePatchOptions.getTimeout(); - } String clientRequestId = null; - if (jobSchedulePatchOptions != null) { - clientRequestId = jobSchedulePatchOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobSchedulePatchOptions != null) { - returnClientRequestId = jobSchedulePatchOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobSchedulePatchOptions != null) { - ocpDate = jobSchedulePatchOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobSchedulePatchOptions != null) { - ifMatch = jobSchedulePatchOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobSchedulePatchOptions != null) { - ifNoneMatch = jobSchedulePatchOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobSchedulePatchOptions != null) { - ifModifiedSince = jobSchedulePatchOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobSchedulePatchOptions != null) { - ifUnmodifiedSince = jobSchedulePatchOptions.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(jobScheduleId, jobSchedulePatchParameter, 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) { @@ -1427,49 +1121,13 @@ public ServiceResponseWithHeaders update(String Validator.validate(jobScheduleUpdateParameter); final JobScheduleUpdateOptions jobScheduleUpdateOptions = null; Integer timeout = null; - if (jobScheduleUpdateOptions != null) { - timeout = jobScheduleUpdateOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleUpdateOptions != null) { - clientRequestId = jobScheduleUpdateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleUpdateOptions != null) { - returnClientRequestId = jobScheduleUpdateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleUpdateOptions != null) { - ocpDate = jobScheduleUpdateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleUpdateOptions != null) { - ifMatch = jobScheduleUpdateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleUpdateOptions != null) { - ifNoneMatch = jobScheduleUpdateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleUpdateOptions != null) { - ifModifiedSince = jobScheduleUpdateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleUpdateOptions != null) { - ifUnmodifiedSince = jobScheduleUpdateOptions.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(jobScheduleId, jobScheduleUpdateParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return updateDelegate(call.execute()); } @@ -1502,49 +1160,13 @@ public ServiceCall updateAsync(String jobScheduleId, JobScheduleUpdateParameter Validator.validate(jobScheduleUpdateParameter, serviceCallback); final JobScheduleUpdateOptions jobScheduleUpdateOptions = null; Integer timeout = null; - if (jobScheduleUpdateOptions != null) { - timeout = jobScheduleUpdateOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleUpdateOptions != null) { - clientRequestId = jobScheduleUpdateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleUpdateOptions != null) { - returnClientRequestId = jobScheduleUpdateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleUpdateOptions != null) { - ocpDate = jobScheduleUpdateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleUpdateOptions != null) { - ifMatch = jobScheduleUpdateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleUpdateOptions != null) { - ifNoneMatch = jobScheduleUpdateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleUpdateOptions != null) { - ifModifiedSince = jobScheduleUpdateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleUpdateOptions != null) { - ifUnmodifiedSince = jobScheduleUpdateOptions.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(jobScheduleId, jobScheduleUpdateParameter, 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) { @@ -1743,49 +1365,13 @@ public ServiceResponseWithHeaders disable(Strin } final JobScheduleDisableOptions jobScheduleDisableOptions = null; Integer timeout = null; - if (jobScheduleDisableOptions != null) { - timeout = jobScheduleDisableOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleDisableOptions != null) { - clientRequestId = jobScheduleDisableOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleDisableOptions != null) { - returnClientRequestId = jobScheduleDisableOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleDisableOptions != null) { - ocpDate = jobScheduleDisableOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleDisableOptions != null) { - ifMatch = jobScheduleDisableOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleDisableOptions != null) { - ifNoneMatch = jobScheduleDisableOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleDisableOptions != null) { - ifModifiedSince = jobScheduleDisableOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleDisableOptions != null) { - ifUnmodifiedSince = jobScheduleDisableOptions.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.disable(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return disableDelegate(call.execute()); } @@ -1812,49 +1398,13 @@ public ServiceCall disableAsync(String jobScheduleId, final ServiceCallback call = service.disable(jobScheduleId, 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) { @@ -2042,49 +1592,13 @@ public ServiceResponseWithHeaders enable(String } final JobScheduleEnableOptions jobScheduleEnableOptions = null; Integer timeout = null; - if (jobScheduleEnableOptions != null) { - timeout = jobScheduleEnableOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleEnableOptions != null) { - clientRequestId = jobScheduleEnableOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleEnableOptions != null) { - returnClientRequestId = jobScheduleEnableOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleEnableOptions != null) { - ocpDate = jobScheduleEnableOptions.getOcpDate(); - } - String ifMatch = null; - if (jobScheduleEnableOptions != null) { - ifMatch = jobScheduleEnableOptions.getIfMatch(); - } - String ifNoneMatch = null; - if (jobScheduleEnableOptions != null) { - ifNoneMatch = jobScheduleEnableOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleEnableOptions != null) { - ifModifiedSince = jobScheduleEnableOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleEnableOptions != null) { - ifUnmodifiedSince = jobScheduleEnableOptions.getIfUnmodifiedSince(); - } 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); - } Call call = service.enable(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return enableDelegate(call.execute()); } @@ -2111,49 +1625,13 @@ public ServiceCall enableAsync(String jobScheduleId, final ServiceCallback } final JobScheduleEnableOptions jobScheduleEnableOptions = null; Integer timeout = null; - if (jobScheduleEnableOptions != null) { - timeout = jobScheduleEnableOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleEnableOptions != null) { - clientRequestId = jobScheduleEnableOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleEnableOptions != null) { - returnClientRequestId = jobScheduleEnableOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleEnableOptions != null) { - ocpDate = jobScheduleEnableOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleEnableOptions != null) { - ifMatch = jobScheduleEnableOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleEnableOptions != null) { - ifNoneMatch = jobScheduleEnableOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleEnableOptions != null) { - ifModifiedSince = jobScheduleEnableOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleEnableOptions != null) { - ifUnmodifiedSince = jobScheduleEnableOptions.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(jobScheduleId, 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) { @@ -2341,49 +1819,13 @@ public ServiceResponseWithHeaders terminate(S } final JobScheduleTerminateOptions jobScheduleTerminateOptions = null; Integer timeout = null; - if (jobScheduleTerminateOptions != null) { - timeout = jobScheduleTerminateOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleTerminateOptions != null) { - clientRequestId = jobScheduleTerminateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleTerminateOptions != null) { - returnClientRequestId = jobScheduleTerminateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleTerminateOptions != null) { - ocpDate = jobScheduleTerminateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (jobScheduleTerminateOptions != null) { - ifMatch = jobScheduleTerminateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (jobScheduleTerminateOptions != null) { - ifNoneMatch = jobScheduleTerminateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (jobScheduleTerminateOptions != null) { - ifModifiedSince = jobScheduleTerminateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (jobScheduleTerminateOptions != null) { - ifUnmodifiedSince = jobScheduleTerminateOptions.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.terminate(jobScheduleId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return terminateDelegate(call.execute()); } @@ -2410,49 +1852,13 @@ public ServiceCall terminateAsync(String jobScheduleId, final ServiceCallback call = service.terminate(jobScheduleId, 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) { @@ -2641,25 +2047,9 @@ public ServiceResponseWithHeaders add(JobScheduleAd Validator.validate(cloudJobSchedule); final JobScheduleAddOptions jobScheduleAddOptions = null; Integer timeout = null; - if (jobScheduleAddOptions != null) { - timeout = jobScheduleAddOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleAddOptions != null) { - clientRequestId = jobScheduleAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleAddOptions != null) { - returnClientRequestId = jobScheduleAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleAddOptions != null) { - ocpDate = jobScheduleAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(cloudJobSchedule, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return addDelegate(call.execute()); } @@ -2687,25 +2077,9 @@ public ServiceCall addAsync(JobScheduleAddParameter cloudJobSchedule, final Serv Validator.validate(cloudJobSchedule, serviceCallback); final JobScheduleAddOptions jobScheduleAddOptions = null; Integer timeout = null; - if (jobScheduleAddOptions != null) { - timeout = jobScheduleAddOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleAddOptions != null) { - clientRequestId = jobScheduleAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleAddOptions != null) { - returnClientRequestId = jobScheduleAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleAddOptions != null) { - ocpDate = jobScheduleAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(cloudJobSchedule, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -2843,54 +2217,19 @@ public ServiceResponseWithHeaders, JobScheduleListHe } final JobScheduleListOptions jobScheduleListOptions = null; String filter = null; - if (jobScheduleListOptions != null) { - filter = jobScheduleListOptions.getFilter(); - } String select = null; - if (jobScheduleListOptions != null) { - select = jobScheduleListOptions.getSelect(); - } String expand = null; - if (jobScheduleListOptions != null) { - expand = jobScheduleListOptions.getExpand(); - } Integer maxResults = null; - if (jobScheduleListOptions != null) { - maxResults = jobScheduleListOptions.getMaxResults(); - } Integer timeout = null; - if (jobScheduleListOptions != null) { - timeout = jobScheduleListOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleListOptions != null) { - clientRequestId = jobScheduleListOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleListOptions != null) { - returnClientRequestId = jobScheduleListOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleListOptions != null) { - ocpDate = jobScheduleListOptions.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, JobScheduleListHeaders> response = listDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - JobScheduleListNextOptions jobScheduleListNextOptions = null; - if (jobScheduleListOptions != null) { - jobScheduleListNextOptions = new JobScheduleListNextOptions(); - jobScheduleListNextOptions.setClientRequestId(jobScheduleListOptions.getClientRequestId()); - jobScheduleListNextOptions.setReturnClientRequestId(jobScheduleListOptions.getReturnClientRequestId()); - jobScheduleListNextOptions.setOcpDate(jobScheduleListOptions.getOcpDate()); - } - return listNext(nextPageLink, jobScheduleListNextOptions).getBody(); + return listNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -2913,41 +2252,13 @@ public ServiceCall listAsync(final ListOperationCallback servi } final JobScheduleListOptions jobScheduleListOptions = null; String filter = null; - if (jobScheduleListOptions != null) { - filter = jobScheduleListOptions.getFilter(); - } String select = null; - if (jobScheduleListOptions != null) { - select = jobScheduleListOptions.getSelect(); - } String expand = null; - if (jobScheduleListOptions != null) { - expand = jobScheduleListOptions.getExpand(); - } Integer maxResults = null; - if (jobScheduleListOptions != null) { - maxResults = jobScheduleListOptions.getMaxResults(); - } Integer timeout = null; - if (jobScheduleListOptions != null) { - timeout = jobScheduleListOptions.getTimeout(); - } String clientRequestId = null; - if (jobScheduleListOptions != null) { - clientRequestId = jobScheduleListOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleListOptions != null) { - returnClientRequestId = jobScheduleListOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleListOptions != null) { - ocpDate = jobScheduleListOptions.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) { @@ -2958,14 +2269,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) { - JobScheduleListNextOptions jobScheduleListNextOptions = null; - if (jobScheduleListOptions != null) { - jobScheduleListNextOptions = new JobScheduleListNextOptions(); - jobScheduleListNextOptions.setClientRequestId(jobScheduleListOptions.getClientRequestId()); - jobScheduleListNextOptions.setReturnClientRequestId(jobScheduleListOptions.getReturnClientRequestId()); - jobScheduleListNextOptions.setOcpDate(jobScheduleListOptions.getOcpDate()); - } - listNextAsync(result.getBody().getNextPageLink(), jobScheduleListNextOptions, serviceCall, serviceCallback); + listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -3149,21 +2453,8 @@ public ServiceResponseWithHeaders, JobScheduleListHea } final JobScheduleListNextOptions jobScheduleListNextOptions = null; String clientRequestId = null; - if (jobScheduleListNextOptions != null) { - clientRequestId = jobScheduleListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleListNextOptions != null) { - returnClientRequestId = jobScheduleListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleListNextOptions != null) { - ocpDate = jobScheduleListNextOptions.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()); } @@ -3187,21 +2478,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se } final JobScheduleListNextOptions jobScheduleListNextOptions = null; String clientRequestId = null; - if (jobScheduleListNextOptions != null) { - clientRequestId = jobScheduleListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (jobScheduleListNextOptions != null) { - returnClientRequestId = jobScheduleListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (jobScheduleListNextOptions != null) { - ocpDate = jobScheduleListNextOptions.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) { @@ -3212,7 +2490,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(), jobScheduleListNextOptions, 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/PoolOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/PoolOperationsImpl.java index 42bee32da08c..577589035fd8 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/PoolOperationsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/PoolOperationsImpl.java @@ -199,54 +199,19 @@ public ServiceResponseWithHeaders, PoolListPoolUsage } final PoolListPoolUsageMetricsOptions poolListPoolUsageMetricsOptions = null; DateTime startTime = null; - if (poolListPoolUsageMetricsOptions != null) { - startTime = poolListPoolUsageMetricsOptions.getStartTime(); - } DateTime endTime = null; - if (poolListPoolUsageMetricsOptions != null) { - endTime = poolListPoolUsageMetricsOptions.getEndTime(); - } String filter = null; - if (poolListPoolUsageMetricsOptions != null) { - filter = poolListPoolUsageMetricsOptions.getFilter(); - } Integer maxResults = null; - if (poolListPoolUsageMetricsOptions != null) { - maxResults = poolListPoolUsageMetricsOptions.getMaxResults(); - } Integer timeout = null; - if (poolListPoolUsageMetricsOptions != null) { - timeout = poolListPoolUsageMetricsOptions.getTimeout(); - } String clientRequestId = null; - if (poolListPoolUsageMetricsOptions != null) { - clientRequestId = poolListPoolUsageMetricsOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListPoolUsageMetricsOptions != null) { - returnClientRequestId = poolListPoolUsageMetricsOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListPoolUsageMetricsOptions != null) { - ocpDate = poolListPoolUsageMetricsOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listPoolUsageMetrics(this.client.getApiVersion(), this.client.getAcceptLanguage(), startTime, endTime, filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); ServiceResponseWithHeaders, PoolListPoolUsageMetricsHeaders> response = listPoolUsageMetricsDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - PoolListPoolUsageMetricsNextOptions poolListPoolUsageMetricsNextOptions = null; - if (poolListPoolUsageMetricsOptions != null) { - poolListPoolUsageMetricsNextOptions = new PoolListPoolUsageMetricsNextOptions(); - poolListPoolUsageMetricsNextOptions.setClientRequestId(poolListPoolUsageMetricsOptions.getClientRequestId()); - poolListPoolUsageMetricsNextOptions.setReturnClientRequestId(poolListPoolUsageMetricsOptions.getReturnClientRequestId()); - poolListPoolUsageMetricsNextOptions.setOcpDate(poolListPoolUsageMetricsOptions.getOcpDate()); - } - return listPoolUsageMetricsNext(nextPageLink, poolListPoolUsageMetricsNextOptions).getBody(); + return listPoolUsageMetricsNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -269,41 +234,13 @@ public ServiceCall listPoolUsageMetricsAsync(final ListOperationCallback call = service.listPoolUsageMetrics(this.client.getApiVersion(), this.client.getAcceptLanguage(), startTime, endTime, filter, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @@ -314,14 +251,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) { - PoolListPoolUsageMetricsNextOptions poolListPoolUsageMetricsNextOptions = null; - if (poolListPoolUsageMetricsOptions != null) { - poolListPoolUsageMetricsNextOptions = new PoolListPoolUsageMetricsNextOptions(); - poolListPoolUsageMetricsNextOptions.setClientRequestId(poolListPoolUsageMetricsOptions.getClientRequestId()); - poolListPoolUsageMetricsNextOptions.setReturnClientRequestId(poolListPoolUsageMetricsOptions.getReturnClientRequestId()); - poolListPoolUsageMetricsNextOptions.setOcpDate(poolListPoolUsageMetricsOptions.getOcpDate()); - } - listPoolUsageMetricsNextAsync(result.getBody().getNextPageLink(), poolListPoolUsageMetricsNextOptions, serviceCall, serviceCallback); + listPoolUsageMetricsNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -504,25 +434,9 @@ public ServiceResponseWithHeaders call = service.getAllPoolsLifetimeStatistics(this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return getAllPoolsLifetimeStatisticsDelegate(call.execute()); } @@ -544,25 +458,9 @@ public ServiceCall getAllPoolsLifetimeStatisticsAsync(final ServiceCallback call = service.getAllPoolsLifetimeStatistics(this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -694,25 +592,9 @@ public ServiceResponseWithHeaders add(PoolAddParameter poo Validator.validate(pool); final PoolAddOptions poolAddOptions = null; Integer timeout = null; - if (poolAddOptions != null) { - timeout = poolAddOptions.getTimeout(); - } String clientRequestId = null; - if (poolAddOptions != null) { - clientRequestId = poolAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolAddOptions != null) { - returnClientRequestId = poolAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolAddOptions != null) { - ocpDate = poolAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(pool, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return addDelegate(call.execute()); } @@ -740,25 +622,9 @@ public ServiceCall addAsync(PoolAddParameter pool, final ServiceCallback s Validator.validate(pool, serviceCallback); final PoolAddOptions poolAddOptions = null; Integer timeout = null; - if (poolAddOptions != null) { - timeout = poolAddOptions.getTimeout(); - } String clientRequestId = null; - if (poolAddOptions != null) { - clientRequestId = poolAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolAddOptions != null) { - returnClientRequestId = poolAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolAddOptions != null) { - ocpDate = poolAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(pool, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -896,54 +762,19 @@ public ServiceResponseWithHeaders, PoolListHeaders> list() } final PoolListOptions poolListOptions = null; String filter = null; - if (poolListOptions != null) { - filter = poolListOptions.getFilter(); - } String select = null; - if (poolListOptions != null) { - select = poolListOptions.getSelect(); - } String expand = null; - if (poolListOptions != null) { - expand = poolListOptions.getExpand(); - } Integer maxResults = null; - if (poolListOptions != null) { - maxResults = poolListOptions.getMaxResults(); - } Integer timeout = null; - if (poolListOptions != null) { - timeout = poolListOptions.getTimeout(); - } String clientRequestId = null; - if (poolListOptions != null) { - clientRequestId = poolListOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListOptions != null) { - returnClientRequestId = poolListOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListOptions != null) { - ocpDate = poolListOptions.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, PoolListHeaders> response = listDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - PoolListNextOptions poolListNextOptions = null; - if (poolListOptions != null) { - poolListNextOptions = new PoolListNextOptions(); - poolListNextOptions.setClientRequestId(poolListOptions.getClientRequestId()); - poolListNextOptions.setReturnClientRequestId(poolListOptions.getReturnClientRequestId()); - poolListNextOptions.setOcpDate(poolListOptions.getOcpDate()); - } - return listNext(nextPageLink, poolListNextOptions).getBody(); + return listNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -966,41 +797,13 @@ public ServiceCall listAsync(final ListOperationCallback serviceCallb } final PoolListOptions poolListOptions = null; String filter = null; - if (poolListOptions != null) { - filter = poolListOptions.getFilter(); - } String select = null; - if (poolListOptions != null) { - select = poolListOptions.getSelect(); - } String expand = null; - if (poolListOptions != null) { - expand = poolListOptions.getExpand(); - } Integer maxResults = null; - if (poolListOptions != null) { - maxResults = poolListOptions.getMaxResults(); - } Integer timeout = null; - if (poolListOptions != null) { - timeout = poolListOptions.getTimeout(); - } String clientRequestId = null; - if (poolListOptions != null) { - clientRequestId = poolListOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListOptions != null) { - returnClientRequestId = poolListOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListOptions != null) { - ocpDate = poolListOptions.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) { @@ -1011,14 +814,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) { - PoolListNextOptions poolListNextOptions = null; - if (poolListOptions != null) { - poolListNextOptions = new PoolListNextOptions(); - poolListNextOptions.setClientRequestId(poolListOptions.getClientRequestId()); - poolListNextOptions.setReturnClientRequestId(poolListOptions.getReturnClientRequestId()); - poolListNextOptions.setOcpDate(poolListOptions.getOcpDate()); - } - listNextAsync(result.getBody().getNextPageLink(), poolListNextOptions, serviceCall, serviceCallback); + listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -1205,49 +1001,13 @@ public ServiceResponseWithHeaders delete(String poolId) } final PoolDeleteOptions poolDeleteOptions = null; Integer timeout = null; - if (poolDeleteOptions != null) { - timeout = poolDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (poolDeleteOptions != null) { - clientRequestId = poolDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolDeleteOptions != null) { - returnClientRequestId = poolDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolDeleteOptions != null) { - ocpDate = poolDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolDeleteOptions != null) { - ifMatch = poolDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolDeleteOptions != null) { - ifNoneMatch = poolDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolDeleteOptions != null) { - ifModifiedSince = poolDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolDeleteOptions != null) { - ifUnmodifiedSince = poolDeleteOptions.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(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return deleteDelegate(call.execute()); } @@ -1274,49 +1034,13 @@ public ServiceCall deleteAsync(String poolId, final ServiceCallback servic } final PoolDeleteOptions poolDeleteOptions = null; Integer timeout = null; - if (poolDeleteOptions != null) { - timeout = poolDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (poolDeleteOptions != null) { - clientRequestId = poolDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolDeleteOptions != null) { - returnClientRequestId = poolDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolDeleteOptions != null) { - ocpDate = poolDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolDeleteOptions != null) { - ifMatch = poolDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolDeleteOptions != null) { - ifNoneMatch = poolDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolDeleteOptions != null) { - ifModifiedSince = poolDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolDeleteOptions != null) { - ifUnmodifiedSince = poolDeleteOptions.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(poolId, 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) { @@ -1504,53 +1228,14 @@ public ServiceResponseWithHeaders exists(String pool } final PoolExistsOptions poolExistsOptions = null; String select = null; - if (poolExistsOptions != null) { - select = poolExistsOptions.getSelect(); - } Integer timeout = null; - if (poolExistsOptions != null) { - timeout = poolExistsOptions.getTimeout(); - } String clientRequestId = null; - if (poolExistsOptions != null) { - clientRequestId = poolExistsOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolExistsOptions != null) { - returnClientRequestId = poolExistsOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolExistsOptions != null) { - ocpDate = poolExistsOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolExistsOptions != null) { - ifMatch = poolExistsOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolExistsOptions != null) { - ifNoneMatch = poolExistsOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolExistsOptions != null) { - ifModifiedSince = poolExistsOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolExistsOptions != null) { - ifUnmodifiedSince = poolExistsOptions.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.exists(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return existsDelegate(call.execute()); } @@ -1577,53 +1262,14 @@ public ServiceCall existsAsync(String poolId, final ServiceCallback ser } final PoolExistsOptions poolExistsOptions = null; String select = null; - if (poolExistsOptions != null) { - select = poolExistsOptions.getSelect(); - } Integer timeout = null; - if (poolExistsOptions != null) { - timeout = poolExistsOptions.getTimeout(); - } String clientRequestId = null; - if (poolExistsOptions != null) { - clientRequestId = poolExistsOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolExistsOptions != null) { - returnClientRequestId = poolExistsOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolExistsOptions != null) { - ocpDate = poolExistsOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolExistsOptions != null) { - ifMatch = poolExistsOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolExistsOptions != null) { - ifNoneMatch = poolExistsOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolExistsOptions != null) { - ifModifiedSince = poolExistsOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolExistsOptions != null) { - ifUnmodifiedSince = poolExistsOptions.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.exists(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseEmptyCallback(serviceCallback) { @@ -1820,57 +1466,15 @@ public ServiceResponseWithHeaders get(String poolId) } final PoolGetOptions poolGetOptions = null; String select = null; - if (poolGetOptions != null) { - select = poolGetOptions.getSelect(); - } String expand = null; - if (poolGetOptions != null) { - expand = poolGetOptions.getExpand(); - } Integer timeout = null; - if (poolGetOptions != null) { - timeout = poolGetOptions.getTimeout(); - } String clientRequestId = null; - if (poolGetOptions != null) { - clientRequestId = poolGetOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolGetOptions != null) { - returnClientRequestId = poolGetOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolGetOptions != null) { - ocpDate = poolGetOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolGetOptions != null) { - ifMatch = poolGetOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolGetOptions != null) { - ifNoneMatch = poolGetOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolGetOptions != null) { - ifModifiedSince = poolGetOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolGetOptions != null) { - ifUnmodifiedSince = poolGetOptions.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.get(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return getDelegate(call.execute()); } @@ -1897,57 +1501,15 @@ public ServiceCall getAsync(String poolId, final ServiceCallback serv } final PoolGetOptions poolGetOptions = null; String select = null; - if (poolGetOptions != null) { - select = poolGetOptions.getSelect(); - } String expand = null; - if (poolGetOptions != null) { - expand = poolGetOptions.getExpand(); - } Integer timeout = null; - if (poolGetOptions != null) { - timeout = poolGetOptions.getTimeout(); - } String clientRequestId = null; - if (poolGetOptions != null) { - clientRequestId = poolGetOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolGetOptions != null) { - returnClientRequestId = poolGetOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolGetOptions != null) { - ocpDate = poolGetOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolGetOptions != null) { - ifMatch = poolGetOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolGetOptions != null) { - ifNoneMatch = poolGetOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolGetOptions != null) { - ifModifiedSince = poolGetOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolGetOptions != null) { - ifUnmodifiedSince = poolGetOptions.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.get(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -2156,49 +1718,13 @@ public ServiceResponseWithHeaders patch(String poolId, P Validator.validate(poolPatchParameter); final PoolPatchOptions poolPatchOptions = null; Integer timeout = null; - if (poolPatchOptions != null) { - timeout = poolPatchOptions.getTimeout(); - } String clientRequestId = null; - if (poolPatchOptions != null) { - clientRequestId = poolPatchOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolPatchOptions != null) { - returnClientRequestId = poolPatchOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolPatchOptions != null) { - ocpDate = poolPatchOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolPatchOptions != null) { - ifMatch = poolPatchOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolPatchOptions != null) { - ifNoneMatch = poolPatchOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolPatchOptions != null) { - ifModifiedSince = poolPatchOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolPatchOptions != null) { - ifUnmodifiedSince = poolPatchOptions.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(poolId, poolPatchParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return patchDelegate(call.execute()); } @@ -2231,49 +1757,13 @@ public ServiceCall patchAsync(String poolId, PoolPatchParameter poolPatchParamet Validator.validate(poolPatchParameter, serviceCallback); final PoolPatchOptions poolPatchOptions = null; Integer timeout = null; - if (poolPatchOptions != null) { - timeout = poolPatchOptions.getTimeout(); - } String clientRequestId = null; - if (poolPatchOptions != null) { - clientRequestId = poolPatchOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolPatchOptions != null) { - returnClientRequestId = poolPatchOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolPatchOptions != null) { - ocpDate = poolPatchOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolPatchOptions != null) { - ifMatch = poolPatchOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolPatchOptions != null) { - ifNoneMatch = poolPatchOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolPatchOptions != null) { - ifModifiedSince = poolPatchOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolPatchOptions != null) { - ifUnmodifiedSince = poolPatchOptions.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(poolId, poolPatchParameter, 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) { @@ -2472,25 +1962,9 @@ public ServiceResponseWithHeaders disableAuto } final PoolDisableAutoScaleOptions poolDisableAutoScaleOptions = null; Integer timeout = null; - if (poolDisableAutoScaleOptions != null) { - timeout = poolDisableAutoScaleOptions.getTimeout(); - } String clientRequestId = null; - if (poolDisableAutoScaleOptions != null) { - clientRequestId = poolDisableAutoScaleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolDisableAutoScaleOptions != null) { - returnClientRequestId = poolDisableAutoScaleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolDisableAutoScaleOptions != null) { - ocpDate = poolDisableAutoScaleOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.disableAutoScale(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return disableAutoScaleDelegate(call.execute()); } @@ -2517,25 +1991,9 @@ public ServiceCall disableAutoScaleAsync(String poolId, final ServiceCallback call = service.disableAutoScale(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -2680,49 +2138,13 @@ public ServiceResponseWithHeaders enableAutoSc Validator.validate(poolEnableAutoScaleParameter); final PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = null; Integer timeout = null; - if (poolEnableAutoScaleOptions != null) { - timeout = poolEnableAutoScaleOptions.getTimeout(); - } String clientRequestId = null; - if (poolEnableAutoScaleOptions != null) { - clientRequestId = poolEnableAutoScaleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolEnableAutoScaleOptions != null) { - returnClientRequestId = poolEnableAutoScaleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolEnableAutoScaleOptions != null) { - ocpDate = poolEnableAutoScaleOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolEnableAutoScaleOptions != null) { - ifMatch = poolEnableAutoScaleOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolEnableAutoScaleOptions != null) { - ifNoneMatch = poolEnableAutoScaleOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolEnableAutoScaleOptions != null) { - ifModifiedSince = poolEnableAutoScaleOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolEnableAutoScaleOptions != null) { - ifUnmodifiedSince = poolEnableAutoScaleOptions.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.enableAutoScale(poolId, poolEnableAutoScaleParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return enableAutoScaleDelegate(call.execute()); } @@ -2755,49 +2177,13 @@ public ServiceCall enableAutoScaleAsync(String poolId, PoolEnableAutoScaleParame Validator.validate(poolEnableAutoScaleParameter, serviceCallback); final PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = null; Integer timeout = null; - if (poolEnableAutoScaleOptions != null) { - timeout = poolEnableAutoScaleOptions.getTimeout(); - } String clientRequestId = null; - if (poolEnableAutoScaleOptions != null) { - clientRequestId = poolEnableAutoScaleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolEnableAutoScaleOptions != null) { - returnClientRequestId = poolEnableAutoScaleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolEnableAutoScaleOptions != null) { - ocpDate = poolEnableAutoScaleOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolEnableAutoScaleOptions != null) { - ifMatch = poolEnableAutoScaleOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolEnableAutoScaleOptions != null) { - ifNoneMatch = poolEnableAutoScaleOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolEnableAutoScaleOptions != null) { - ifModifiedSince = poolEnableAutoScaleOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolEnableAutoScaleOptions != null) { - ifUnmodifiedSince = poolEnableAutoScaleOptions.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.enableAutoScale(poolId, poolEnableAutoScaleParameter, 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) { @@ -3000,27 +2386,11 @@ public ServiceResponseWithHeaders ev } final PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = null; Integer timeout = null; - if (poolEvaluateAutoScaleOptions != null) { - timeout = poolEvaluateAutoScaleOptions.getTimeout(); - } String clientRequestId = null; - if (poolEvaluateAutoScaleOptions != null) { - clientRequestId = poolEvaluateAutoScaleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolEvaluateAutoScaleOptions != null) { - returnClientRequestId = poolEvaluateAutoScaleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolEvaluateAutoScaleOptions != null) { - ocpDate = poolEvaluateAutoScaleOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; PoolEvaluateAutoScaleParameter poolEvaluateAutoScaleParameter = new PoolEvaluateAutoScaleParameter(); poolEvaluateAutoScaleParameter.setAutoScaleFormula(autoScaleFormula); - DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.evaluateAutoScale(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, poolEvaluateAutoScaleParameter); return evaluateAutoScaleDelegate(call.execute()); } @@ -3052,27 +2422,11 @@ public ServiceCall evaluateAutoScaleAsync(String poolId, String autoScaleFormula } final PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = null; Integer timeout = null; - if (poolEvaluateAutoScaleOptions != null) { - timeout = poolEvaluateAutoScaleOptions.getTimeout(); - } String clientRequestId = null; - if (poolEvaluateAutoScaleOptions != null) { - clientRequestId = poolEvaluateAutoScaleOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolEvaluateAutoScaleOptions != null) { - returnClientRequestId = poolEvaluateAutoScaleOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolEvaluateAutoScaleOptions != null) { - ocpDate = poolEvaluateAutoScaleOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; PoolEvaluateAutoScaleParameter poolEvaluateAutoScaleParameter = new PoolEvaluateAutoScaleParameter(); poolEvaluateAutoScaleParameter.setAutoScaleFormula(autoScaleFormula); - DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.evaluateAutoScale(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, poolEvaluateAutoScaleParameter); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -3230,49 +2584,13 @@ public ServiceResponseWithHeaders resize(String poolId, Validator.validate(poolResizeParameter); final PoolResizeOptions poolResizeOptions = null; Integer timeout = null; - if (poolResizeOptions != null) { - timeout = poolResizeOptions.getTimeout(); - } String clientRequestId = null; - if (poolResizeOptions != null) { - clientRequestId = poolResizeOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolResizeOptions != null) { - returnClientRequestId = poolResizeOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolResizeOptions != null) { - ocpDate = poolResizeOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolResizeOptions != null) { - ifMatch = poolResizeOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolResizeOptions != null) { - ifNoneMatch = poolResizeOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolResizeOptions != null) { - ifModifiedSince = poolResizeOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolResizeOptions != null) { - ifUnmodifiedSince = poolResizeOptions.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.resize(poolId, poolResizeParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return resizeDelegate(call.execute()); } @@ -3305,49 +2623,13 @@ public ServiceCall resizeAsync(String poolId, PoolResizeParameter poolResizePara Validator.validate(poolResizeParameter, serviceCallback); final PoolResizeOptions poolResizeOptions = null; Integer timeout = null; - if (poolResizeOptions != null) { - timeout = poolResizeOptions.getTimeout(); - } String clientRequestId = null; - if (poolResizeOptions != null) { - clientRequestId = poolResizeOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolResizeOptions != null) { - returnClientRequestId = poolResizeOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolResizeOptions != null) { - ocpDate = poolResizeOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolResizeOptions != null) { - ifMatch = poolResizeOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolResizeOptions != null) { - ifNoneMatch = poolResizeOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolResizeOptions != null) { - ifModifiedSince = poolResizeOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolResizeOptions != null) { - ifUnmodifiedSince = poolResizeOptions.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.resize(poolId, poolResizeParameter, 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) { @@ -3546,49 +2828,13 @@ public ServiceResponseWithHeaders stopResize(String } final PoolStopResizeOptions poolStopResizeOptions = null; Integer timeout = null; - if (poolStopResizeOptions != null) { - timeout = poolStopResizeOptions.getTimeout(); - } String clientRequestId = null; - if (poolStopResizeOptions != null) { - clientRequestId = poolStopResizeOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolStopResizeOptions != null) { - returnClientRequestId = poolStopResizeOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolStopResizeOptions != null) { - ocpDate = poolStopResizeOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolStopResizeOptions != null) { - ifMatch = poolStopResizeOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolStopResizeOptions != null) { - ifNoneMatch = poolStopResizeOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolStopResizeOptions != null) { - ifModifiedSince = poolStopResizeOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolStopResizeOptions != null) { - ifUnmodifiedSince = poolStopResizeOptions.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.stopResize(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return stopResizeDelegate(call.execute()); } @@ -3615,49 +2861,13 @@ public ServiceCall stopResizeAsync(String poolId, final ServiceCallback se } final PoolStopResizeOptions poolStopResizeOptions = null; Integer timeout = null; - if (poolStopResizeOptions != null) { - timeout = poolStopResizeOptions.getTimeout(); - } String clientRequestId = null; - if (poolStopResizeOptions != null) { - clientRequestId = poolStopResizeOptions.getClientRequestId(); - } - Boolean returnClientRequestId = null; - if (poolStopResizeOptions != null) { - returnClientRequestId = poolStopResizeOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolStopResizeOptions != null) { - ocpDate = poolStopResizeOptions.getOcpDate(); - } - String ifMatch = null; - if (poolStopResizeOptions != null) { - ifMatch = poolStopResizeOptions.getIfMatch(); - } - String ifNoneMatch = null; - if (poolStopResizeOptions != null) { - ifNoneMatch = poolStopResizeOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolStopResizeOptions != null) { - ifModifiedSince = poolStopResizeOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolStopResizeOptions != null) { - ifUnmodifiedSince = poolStopResizeOptions.getIfUnmodifiedSince(); - } - DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } + Boolean returnClientRequestId = null; + DateTimeRfc1123 ocpDateConverted = null; + 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); - } Call call = service.stopResize(poolId, 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) { @@ -3850,25 +3060,9 @@ public ServiceResponseWithHeaders updatePrope Validator.validate(poolUpdatePropertiesParameter); final PoolUpdatePropertiesOptions poolUpdatePropertiesOptions = null; Integer timeout = null; - if (poolUpdatePropertiesOptions != null) { - timeout = poolUpdatePropertiesOptions.getTimeout(); - } String clientRequestId = null; - if (poolUpdatePropertiesOptions != null) { - clientRequestId = poolUpdatePropertiesOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolUpdatePropertiesOptions != null) { - returnClientRequestId = poolUpdatePropertiesOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolUpdatePropertiesOptions != null) { - ocpDate = poolUpdatePropertiesOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.updateProperties(poolId, poolUpdatePropertiesParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return updatePropertiesDelegate(call.execute()); } @@ -3901,25 +3095,9 @@ public ServiceCall updatePropertiesAsync(String poolId, PoolUpdatePropertiesPara Validator.validate(poolUpdatePropertiesParameter, serviceCallback); final PoolUpdatePropertiesOptions poolUpdatePropertiesOptions = null; Integer timeout = null; - if (poolUpdatePropertiesOptions != null) { - timeout = poolUpdatePropertiesOptions.getTimeout(); - } String clientRequestId = null; - if (poolUpdatePropertiesOptions != null) { - clientRequestId = poolUpdatePropertiesOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolUpdatePropertiesOptions != null) { - returnClientRequestId = poolUpdatePropertiesOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolUpdatePropertiesOptions != null) { - ocpDate = poolUpdatePropertiesOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.updateProperties(poolId, poolUpdatePropertiesParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -4074,51 +3252,15 @@ public ServiceResponseWithHeaders upgradeOS(String p } final PoolUpgradeOSOptions poolUpgradeOSOptions = null; Integer timeout = null; - if (poolUpgradeOSOptions != null) { - timeout = poolUpgradeOSOptions.getTimeout(); - } String clientRequestId = null; - if (poolUpgradeOSOptions != null) { - clientRequestId = poolUpgradeOSOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolUpgradeOSOptions != null) { - returnClientRequestId = poolUpgradeOSOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolUpgradeOSOptions != null) { - ocpDate = poolUpgradeOSOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolUpgradeOSOptions != null) { - ifMatch = poolUpgradeOSOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolUpgradeOSOptions != null) { - ifNoneMatch = poolUpgradeOSOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolUpgradeOSOptions != null) { - ifModifiedSince = poolUpgradeOSOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolUpgradeOSOptions != null) { - ifUnmodifiedSince = poolUpgradeOSOptions.getIfUnmodifiedSince(); - } - PoolUpgradeOSParameter poolUpgradeOSParameter = new PoolUpgradeOSParameter(); - poolUpgradeOSParameter.setTargetOSVersion(targetOSVersion); - 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); - } + PoolUpgradeOSParameter poolUpgradeOSParameter = new PoolUpgradeOSParameter(); + poolUpgradeOSParameter.setTargetOSVersion(targetOSVersion); Call call = service.upgradeOS(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, poolUpgradeOSParameter); return upgradeOSDelegate(call.execute()); } @@ -4150,51 +3292,15 @@ public ServiceCall upgradeOSAsync(String poolId, String targetOSVersion, final S } final PoolUpgradeOSOptions poolUpgradeOSOptions = null; Integer timeout = null; - if (poolUpgradeOSOptions != null) { - timeout = poolUpgradeOSOptions.getTimeout(); - } String clientRequestId = null; - if (poolUpgradeOSOptions != null) { - clientRequestId = poolUpgradeOSOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolUpgradeOSOptions != null) { - returnClientRequestId = poolUpgradeOSOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolUpgradeOSOptions != null) { - ocpDate = poolUpgradeOSOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolUpgradeOSOptions != null) { - ifMatch = poolUpgradeOSOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolUpgradeOSOptions != null) { - ifNoneMatch = poolUpgradeOSOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolUpgradeOSOptions != null) { - ifModifiedSince = poolUpgradeOSOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolUpgradeOSOptions != null) { - ifUnmodifiedSince = poolUpgradeOSOptions.getIfUnmodifiedSince(); - } - PoolUpgradeOSParameter poolUpgradeOSParameter = new PoolUpgradeOSParameter(); - poolUpgradeOSParameter.setTargetOSVersion(targetOSVersion); - 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); - } + PoolUpgradeOSParameter poolUpgradeOSParameter = new PoolUpgradeOSParameter(); + poolUpgradeOSParameter.setTargetOSVersion(targetOSVersion); Call call = service.upgradeOS(poolId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, poolUpgradeOSParameter); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -4400,49 +3506,13 @@ public ServiceResponseWithHeaders removeNodes(Stri Validator.validate(nodeRemoveParameter); final PoolRemoveNodesOptions poolRemoveNodesOptions = null; Integer timeout = null; - if (poolRemoveNodesOptions != null) { - timeout = poolRemoveNodesOptions.getTimeout(); - } String clientRequestId = null; - if (poolRemoveNodesOptions != null) { - clientRequestId = poolRemoveNodesOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolRemoveNodesOptions != null) { - returnClientRequestId = poolRemoveNodesOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolRemoveNodesOptions != null) { - ocpDate = poolRemoveNodesOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolRemoveNodesOptions != null) { - ifMatch = poolRemoveNodesOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolRemoveNodesOptions != null) { - ifNoneMatch = poolRemoveNodesOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolRemoveNodesOptions != null) { - ifModifiedSince = poolRemoveNodesOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolRemoveNodesOptions != null) { - ifUnmodifiedSince = poolRemoveNodesOptions.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.removeNodes(poolId, nodeRemoveParameter, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return removeNodesDelegate(call.execute()); } @@ -4475,49 +3545,13 @@ public ServiceCall removeNodesAsync(String poolId, NodeRemoveParameter nodeRemov Validator.validate(nodeRemoveParameter, serviceCallback); final PoolRemoveNodesOptions poolRemoveNodesOptions = null; Integer timeout = null; - if (poolRemoveNodesOptions != null) { - timeout = poolRemoveNodesOptions.getTimeout(); - } String clientRequestId = null; - if (poolRemoveNodesOptions != null) { - clientRequestId = poolRemoveNodesOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolRemoveNodesOptions != null) { - returnClientRequestId = poolRemoveNodesOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolRemoveNodesOptions != null) { - ocpDate = poolRemoveNodesOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (poolRemoveNodesOptions != null) { - ifMatch = poolRemoveNodesOptions.getIfMatch(); - } String ifNoneMatch = null; - if (poolRemoveNodesOptions != null) { - ifNoneMatch = poolRemoveNodesOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (poolRemoveNodesOptions != null) { - ifModifiedSince = poolRemoveNodesOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (poolRemoveNodesOptions != null) { - ifUnmodifiedSince = poolRemoveNodesOptions.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.removeNodes(poolId, nodeRemoveParameter, 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) { @@ -4713,21 +3747,8 @@ public ServiceResponseWithHeaders, PoolListPoolUsageM } final PoolListPoolUsageMetricsNextOptions poolListPoolUsageMetricsNextOptions = null; String clientRequestId = null; - if (poolListPoolUsageMetricsNextOptions != null) { - clientRequestId = poolListPoolUsageMetricsNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListPoolUsageMetricsNextOptions != null) { - returnClientRequestId = poolListPoolUsageMetricsNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListPoolUsageMetricsNextOptions != null) { - ocpDate = poolListPoolUsageMetricsNextOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listPoolUsageMetricsNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); return listPoolUsageMetricsNextDelegate(call.execute()); } @@ -4751,21 +3772,8 @@ public ServiceCall listPoolUsageMetricsNextAsync(final String nextPageLink, fina } final PoolListPoolUsageMetricsNextOptions poolListPoolUsageMetricsNextOptions = null; String clientRequestId = null; - if (poolListPoolUsageMetricsNextOptions != null) { - clientRequestId = poolListPoolUsageMetricsNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListPoolUsageMetricsNextOptions != null) { - returnClientRequestId = poolListPoolUsageMetricsNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListPoolUsageMetricsNextOptions != null) { - ocpDate = poolListPoolUsageMetricsNextOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listPoolUsageMetricsNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted); serviceCall.newCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @@ -4776,7 +3784,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) { - listPoolUsageMetricsNextAsync(result.getBody().getNextPageLink(), poolListPoolUsageMetricsNextOptions, serviceCall, serviceCallback); + listPoolUsageMetricsNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -4902,21 +3910,8 @@ public ServiceResponseWithHeaders, PoolListHeaders> listNext } final PoolListNextOptions poolListNextOptions = null; String clientRequestId = null; - if (poolListNextOptions != null) { - clientRequestId = poolListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListNextOptions != null) { - returnClientRequestId = poolListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListNextOptions != null) { - ocpDate = poolListNextOptions.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()); } @@ -4940,21 +3935,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se } final PoolListNextOptions poolListNextOptions = null; String clientRequestId = null; - if (poolListNextOptions != null) { - clientRequestId = poolListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (poolListNextOptions != null) { - returnClientRequestId = poolListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (poolListNextOptions != null) { - ocpDate = poolListNextOptions.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) { @@ -4965,7 +3947,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(), poolListNextOptions, 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/TaskOperationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/TaskOperationsImpl.java index 1b7246dc453a..1d17972b26c1 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/TaskOperationsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/TaskOperationsImpl.java @@ -149,25 +149,9 @@ public ServiceResponseWithHeaders add(String jobId, TaskAd Validator.validate(task); final TaskAddOptions taskAddOptions = null; Integer timeout = null; - if (taskAddOptions != null) { - timeout = taskAddOptions.getTimeout(); - } String clientRequestId = null; - if (taskAddOptions != null) { - clientRequestId = taskAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskAddOptions != null) { - returnClientRequestId = taskAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskAddOptions != null) { - ocpDate = taskAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(jobId, task, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return addDelegate(call.execute()); } @@ -200,25 +184,9 @@ public ServiceCall addAsync(String jobId, TaskAddParameter task, final ServiceCa Validator.validate(task, serviceCallback); final TaskAddOptions taskAddOptions = null; Integer timeout = null; - if (taskAddOptions != null) { - timeout = taskAddOptions.getTimeout(); - } String clientRequestId = null; - if (taskAddOptions != null) { - clientRequestId = taskAddOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskAddOptions != null) { - returnClientRequestId = taskAddOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskAddOptions != null) { - ocpDate = taskAddOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.add(jobId, task, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -369,54 +337,19 @@ public ServiceResponseWithHeaders, TaskListHeaders> list(fi } final TaskListOptions taskListOptions = null; String filter = null; - if (taskListOptions != null) { - filter = taskListOptions.getFilter(); - } String select = null; - if (taskListOptions != null) { - select = taskListOptions.getSelect(); - } String expand = null; - if (taskListOptions != null) { - expand = taskListOptions.getExpand(); - } Integer maxResults = null; - if (taskListOptions != null) { - maxResults = taskListOptions.getMaxResults(); - } Integer timeout = null; - if (taskListOptions != null) { - timeout = taskListOptions.getTimeout(); - } String clientRequestId = null; - if (taskListOptions != null) { - clientRequestId = taskListOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskListOptions != null) { - returnClientRequestId = taskListOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskListOptions != null) { - ocpDate = taskListOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.list(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), filter, select, expand, maxResults, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); ServiceResponseWithHeaders, TaskListHeaders> response = listDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws BatchErrorException, IOException { - TaskListNextOptions taskListNextOptions = null; - if (taskListOptions != null) { - taskListNextOptions = new TaskListNextOptions(); - taskListNextOptions.setClientRequestId(taskListOptions.getClientRequestId()); - taskListNextOptions.setReturnClientRequestId(taskListOptions.getReturnClientRequestId()); - taskListNextOptions.setOcpDate(taskListOptions.getOcpDate()); - } - return listNext(nextPageLink, taskListNextOptions).getBody(); + return listNext(nextPageLink, null).getBody(); } }; return new ServiceResponseWithHeaders<>(result, response.getHeaders(), response.getResponse()); @@ -444,41 +377,13 @@ public ServiceCall listAsync(final String jobId, final ListOperationCallback call = service.list(jobId, 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) { @@ -489,14 +394,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) { - TaskListNextOptions taskListNextOptions = null; - if (taskListOptions != null) { - taskListNextOptions = new TaskListNextOptions(); - taskListNextOptions.setClientRequestId(taskListOptions.getClientRequestId()); - taskListNextOptions.setReturnClientRequestId(taskListOptions.getReturnClientRequestId()); - taskListNextOptions.setOcpDate(taskListOptions.getOcpDate()); - } - listNextAsync(result.getBody().getNextPageLink(), taskListNextOptions, serviceCall, serviceCallback); + listNextAsync(result.getBody().getNextPageLink(), null, serviceCall, serviceCallback); } else { serviceCallback.success(new ServiceResponseWithHeaders<>(serviceCallback.get(), result.getHeaders(), result.getResponse())); } @@ -697,27 +595,11 @@ public ServiceResponseWithHeaders call = service.addCollection(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, taskCollection); return addCollectionDelegate(call.execute()); } @@ -750,27 +632,11 @@ public ServiceCall addCollectionAsync(String jobId, List value Validator.validate(value, serviceCallback); final TaskAddCollectionOptions taskAddCollectionOptions = null; Integer timeout = null; - if (taskAddCollectionOptions != null) { - timeout = taskAddCollectionOptions.getTimeout(); - } String clientRequestId = null; - if (taskAddCollectionOptions != null) { - clientRequestId = taskAddCollectionOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskAddCollectionOptions != null) { - returnClientRequestId = taskAddCollectionOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskAddCollectionOptions != null) { - ocpDate = taskAddCollectionOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; TaskAddCollectionParameter taskCollection = new TaskAddCollectionParameter(); taskCollection.setValue(value); - DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.addCollection(jobId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, taskCollection); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -929,49 +795,13 @@ public ServiceResponseWithHeaders delete(String jobId, } final TaskDeleteOptions taskDeleteOptions = null; Integer timeout = null; - if (taskDeleteOptions != null) { - timeout = taskDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (taskDeleteOptions != null) { - clientRequestId = taskDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskDeleteOptions != null) { - returnClientRequestId = taskDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskDeleteOptions != null) { - ocpDate = taskDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskDeleteOptions != null) { - ifMatch = taskDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskDeleteOptions != null) { - ifNoneMatch = taskDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskDeleteOptions != null) { - ifModifiedSince = taskDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskDeleteOptions != null) { - ifUnmodifiedSince = taskDeleteOptions.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, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return deleteDelegate(call.execute()); } @@ -1003,49 +833,13 @@ public ServiceCall deleteAsync(String jobId, String taskId, final ServiceCallbac } final TaskDeleteOptions taskDeleteOptions = null; Integer timeout = null; - if (taskDeleteOptions != null) { - timeout = taskDeleteOptions.getTimeout(); - } String clientRequestId = null; - if (taskDeleteOptions != null) { - clientRequestId = taskDeleteOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskDeleteOptions != null) { - returnClientRequestId = taskDeleteOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskDeleteOptions != null) { - ocpDate = taskDeleteOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskDeleteOptions != null) { - ifMatch = taskDeleteOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskDeleteOptions != null) { - ifNoneMatch = taskDeleteOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskDeleteOptions != null) { - ifModifiedSince = taskDeleteOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskDeleteOptions != null) { - ifUnmodifiedSince = taskDeleteOptions.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, taskId, 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) { @@ -1246,57 +1040,15 @@ public ServiceResponseWithHeaders get(String jobId, S } final TaskGetOptions taskGetOptions = null; String select = null; - if (taskGetOptions != null) { - select = taskGetOptions.getSelect(); - } String expand = null; - if (taskGetOptions != null) { - expand = taskGetOptions.getExpand(); - } Integer timeout = null; - if (taskGetOptions != null) { - timeout = taskGetOptions.getTimeout(); - } String clientRequestId = null; - if (taskGetOptions != null) { - clientRequestId = taskGetOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskGetOptions != null) { - returnClientRequestId = taskGetOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskGetOptions != null) { - ocpDate = taskGetOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskGetOptions != null) { - ifMatch = taskGetOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskGetOptions != null) { - ifNoneMatch = taskGetOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskGetOptions != null) { - ifModifiedSince = taskGetOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskGetOptions != null) { - ifUnmodifiedSince = taskGetOptions.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.get(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return getDelegate(call.execute()); } @@ -1314,71 +1066,29 @@ public ServiceCall getAsync(String jobId, String taskId, final ServiceCallback call = service.get(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, expand, timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1596,51 +1306,15 @@ public ServiceResponseWithHeaders update(String jobId, final TaskConstraints constraints = null; final TaskUpdateOptions taskUpdateOptions = null; Integer timeout = null; - if (taskUpdateOptions != null) { - timeout = taskUpdateOptions.getTimeout(); - } String clientRequestId = null; - if (taskUpdateOptions != null) { - clientRequestId = taskUpdateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskUpdateOptions != null) { - returnClientRequestId = taskUpdateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskUpdateOptions != null) { - ocpDate = taskUpdateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskUpdateOptions != null) { - ifMatch = taskUpdateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskUpdateOptions != null) { - ifNoneMatch = taskUpdateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskUpdateOptions != null) { - ifModifiedSince = taskUpdateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskUpdateOptions != null) { - ifUnmodifiedSince = taskUpdateOptions.getIfUnmodifiedSince(); - } - TaskUpdateParameter taskUpdateParameter = new TaskUpdateParameter(); - taskUpdateParameter.setConstraints(constraints); - 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); - } + TaskUpdateParameter taskUpdateParameter = new TaskUpdateParameter(); + taskUpdateParameter = null; Call call = service.update(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, taskUpdateParameter); return updateDelegate(call.execute()); } @@ -1673,51 +1347,15 @@ public ServiceCall updateAsync(String jobId, String taskId, final ServiceCallbac final TaskConstraints constraints = null; final TaskUpdateOptions taskUpdateOptions = null; Integer timeout = null; - if (taskUpdateOptions != null) { - timeout = taskUpdateOptions.getTimeout(); - } String clientRequestId = null; - if (taskUpdateOptions != null) { - clientRequestId = taskUpdateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskUpdateOptions != null) { - returnClientRequestId = taskUpdateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskUpdateOptions != null) { - ocpDate = taskUpdateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskUpdateOptions != null) { - ifMatch = taskUpdateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskUpdateOptions != null) { - ifNoneMatch = taskUpdateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskUpdateOptions != null) { - ifModifiedSince = taskUpdateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskUpdateOptions != null) { - ifUnmodifiedSince = taskUpdateOptions.getIfUnmodifiedSince(); - } - TaskUpdateParameter taskUpdateParameter = new TaskUpdateParameter(); - taskUpdateParameter.setConstraints(constraints); - 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); - } + TaskUpdateParameter taskUpdateParameter = new TaskUpdateParameter(); + taskUpdateParameter = null; Call call = service.update(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, taskUpdateParameter); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1926,29 +1564,10 @@ public ServiceResponseWithHeaders call = service.listSubtasks(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); return listSubtasksDelegate(call.execute()); } @@ -1980,29 +1599,10 @@ public ServiceCall listSubtasksAsync(String jobId, String taskId, final ServiceC } final TaskListSubtasksOptions taskListSubtasksOptions = null; String select = null; - if (taskListSubtasksOptions != null) { - select = taskListSubtasksOptions.getSelect(); - } Integer timeout = null; - if (taskListSubtasksOptions != null) { - timeout = taskListSubtasksOptions.getTimeout(); - } String clientRequestId = null; - if (taskListSubtasksOptions != null) { - clientRequestId = taskListSubtasksOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskListSubtasksOptions != null) { - returnClientRequestId = taskListSubtasksOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskListSubtasksOptions != null) { - ocpDate = taskListSubtasksOptions.getOcpDate(); - } DateTimeRfc1123 ocpDateConverted = null; - if (ocpDate != null) { - ocpDateConverted = new DateTimeRfc1123(ocpDate); - } Call call = service.listSubtasks(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), select, timeout, clientRequestId, returnClientRequestId, ocpDateConverted); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -2163,49 +1763,13 @@ public ServiceResponseWithHeaders terminate(String j } final TaskTerminateOptions taskTerminateOptions = null; Integer timeout = null; - if (taskTerminateOptions != null) { - timeout = taskTerminateOptions.getTimeout(); - } String clientRequestId = null; - if (taskTerminateOptions != null) { - clientRequestId = taskTerminateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskTerminateOptions != null) { - returnClientRequestId = taskTerminateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskTerminateOptions != null) { - ocpDate = taskTerminateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskTerminateOptions != null) { - ifMatch = taskTerminateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskTerminateOptions != null) { - ifNoneMatch = taskTerminateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskTerminateOptions != null) { - ifModifiedSince = taskTerminateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskTerminateOptions != null) { - ifUnmodifiedSince = taskTerminateOptions.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.terminate(jobId, taskId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted, ifMatch, ifNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted); return terminateDelegate(call.execute()); } @@ -2237,49 +1801,13 @@ public ServiceCall terminateAsync(String jobId, String taskId, final ServiceCall } final TaskTerminateOptions taskTerminateOptions = null; Integer timeout = null; - if (taskTerminateOptions != null) { - timeout = taskTerminateOptions.getTimeout(); - } String clientRequestId = null; - if (taskTerminateOptions != null) { - clientRequestId = taskTerminateOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskTerminateOptions != null) { - returnClientRequestId = taskTerminateOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskTerminateOptions != null) { - ocpDate = taskTerminateOptions.getOcpDate(); - } + DateTimeRfc1123 ocpDateConverted = null; String ifMatch = null; - if (taskTerminateOptions != null) { - ifMatch = taskTerminateOptions.getIfMatch(); - } String ifNoneMatch = null; - if (taskTerminateOptions != null) { - ifNoneMatch = taskTerminateOptions.getIfNoneMatch(); - } - DateTime ifModifiedSince = null; - if (taskTerminateOptions != null) { - ifModifiedSince = taskTerminateOptions.getIfModifiedSince(); - } - DateTime ifUnmodifiedSince = null; - if (taskTerminateOptions != null) { - ifUnmodifiedSince = taskTerminateOptions.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.terminate(jobId, taskId, 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) { @@ -2473,21 +2001,8 @@ public ServiceResponseWithHeaders, TaskListHeaders> listNext } final TaskListNextOptions taskListNextOptions = null; String clientRequestId = null; - if (taskListNextOptions != null) { - clientRequestId = taskListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskListNextOptions != null) { - returnClientRequestId = taskListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskListNextOptions != null) { - ocpDate = taskListNextOptions.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()); } @@ -2511,21 +2026,8 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se } final TaskListNextOptions taskListNextOptions = null; String clientRequestId = null; - if (taskListNextOptions != null) { - clientRequestId = taskListNextOptions.getClientRequestId(); - } Boolean returnClientRequestId = null; - if (taskListNextOptions != null) { - returnClientRequestId = taskListNextOptions.getReturnClientRequestId(); - } - DateTime ocpDate = null; - if (taskListNextOptions != null) { - ocpDate = taskListNextOptions.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) { @@ -2536,7 +2038,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(), taskListNextOptions, 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/models/CloudJob.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CloudJob.java index 172937e3d1fe..23b395a8b7e5 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CloudJob.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CloudJob.java @@ -114,7 +114,7 @@ public class CloudJob { private List commonEnvironmentSettings; /** - * Gets or sets the pool on which the Batch service runs the job’s tasks. + * Gets or sets the pool on which the Batch service runs the job’s tasks. */ private PoolInformation poolInfo; diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobAddParameter.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobAddParameter.java index b26979a77056..f05f337095ad 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobAddParameter.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobAddParameter.java @@ -63,7 +63,7 @@ public class JobAddParameter { private List commonEnvironmentSettings; /** - * Gets or sets the pool on which the Batch service runs the job’s tasks. + * Gets or sets the pool on which the Batch service runs the job’s tasks. */ @JsonProperty(required = true) private PoolInformation poolInfo;