diff --git a/azure-batch/pom.xml b/azure-batch/pom.xml
index fa9c3b3cfb77..d59faffd6f84 100644
--- a/azure-batch/pom.xml
+++ b/azure-batch/pom.xml
@@ -50,6 +50,10 @@
com.microsoft.azure
azure-client-runtime
+
+ commons-codec
+ commons-codec
+
junit
junit
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/CertificateOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
index 795b41f42146..2301c8554753 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
@@ -7,8 +7,19 @@
package com.microsoft.azure.batch;
import com.microsoft.azure.PagedList;
-import com.microsoft.azure.batch.protocol.models.*;
+import com.microsoft.azure.batch.protocol.models.BatchErrorException;
+import com.microsoft.azure.batch.protocol.models.Certificate;
+import com.microsoft.azure.batch.protocol.models.CertificateAddOptions;
+import com.microsoft.azure.batch.protocol.models.CertificateAddParameter;
+import com.microsoft.azure.batch.protocol.models.CertificateCancelDeletionOptions;
+import com.microsoft.azure.batch.protocol.models.CertificateDeleteOptions;
+import com.microsoft.azure.batch.protocol.models.CertificateFormat;
+import com.microsoft.azure.batch.protocol.models.CertificateGetHeaders;
+import com.microsoft.azure.batch.protocol.models.CertificateGetOptions;
+import com.microsoft.azure.batch.protocol.models.CertificateListHeaders;
+import com.microsoft.azure.batch.protocol.models.CertificateListOptions;
import com.microsoft.rest.ServiceResponseWithHeaders;
+import org.apache.commons.codec.binary.Base64;
import java.io.IOException;
import java.io.InputStream;
@@ -18,7 +29,6 @@
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
-import java.util.Base64;
import java.util.Collection;
import java.util.List;
@@ -80,7 +90,7 @@ public void createCertificate(InputStream certStream, Iterable, 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());
@@ -165,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) {
@@ -198,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()));
}
@@ -368,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());
}
@@ -413,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) {
@@ -568,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());
}
@@ -606,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) {
@@ -631,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/BatchCredentialsInterceptor.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchCredentialsInterceptor.java
index 2adb931d72c0..8989458d5dee 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchCredentialsInterceptor.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchCredentialsInterceptor.java
@@ -6,26 +6,24 @@
package com.microsoft.azure.batch.protocol;
+import com.microsoft.rest.DateTimeRfc1123;
+import okhttp3.Interceptor;
+import okhttp3.MediaType;
+import okhttp3.Request;
+import okhttp3.Response;
+import org.apache.commons.codec.binary.Base64;
+import org.joda.time.DateTime;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.ArrayList;
-import java.util.Base64;
import java.util.Collections;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-
-import okhttp3.Interceptor;
-import okhttp3.MediaType;
-import okhttp3.Request;
-import okhttp3.Response;
-import org.joda.time.DateTime;
-
-import com.microsoft.rest.DateTimeRfc1123;
-
public class BatchCredentialsInterceptor implements Interceptor {
/**
@@ -62,10 +60,10 @@ private String sign(String accessKey, String stringToSign) {
// Encoding the Signature
// Signature=Base64(HMAC-SHA256(UTF8(StringToSign)))
Mac hmac = Mac.getInstance("hmacSHA256");
- hmac.init(new SecretKeySpec(Base64.getDecoder().decode(accessKey),
+ hmac.init(new SecretKeySpec(Base64.decodeBase64(accessKey),
"hmacSHA256"));
byte[] digest = hmac.doFinal(stringToSign.getBytes("UTF-8"));
- return new String(Base64.getEncoder().encode(digest), "UTF-8");
+ return Base64.encodeBase64String(digest);
} catch (Exception e) {
throw new IllegalArgumentException("accessKey", e);
}
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java
index c3c0a6bdc7be..1d2a2e5e561c 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClientImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClientImpl.java
index 5aba979736a8..b45318c05040 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClientImpl.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClientImpl.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperations.java
index ba2dd56cd42a..f48122895ab9 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/CertificateOperations.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
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 cff320e62b20..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
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
@@ -134,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());
}
@@ -180,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) {
@@ -336,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());
@@ -402,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) {
@@ -443,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()));
}
@@ -633,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());
}
@@ -683,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) {
@@ -854,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());
}
@@ -904,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) {
@@ -1075,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());
}
@@ -1129,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) {
@@ -1305,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());
}
@@ -1343,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) {
@@ -1368,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/ComputeNodeOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperations.java
index b848af6db4e7..03969f7e1659 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/ComputeNodeOperations.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
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 a4395f5c9424..cfa0fbb3bb42 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
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
@@ -183,25 +169,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());
}
@@ -239,25 +209,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) {
@@ -425,25 +379,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());
}
@@ -480,25 +418,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) {
@@ -669,25 +591,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());
}
@@ -730,25 +636,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) {
@@ -921,29 +811,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());
}
@@ -975,29 +846,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) {
@@ -1159,30 +1011,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());
}
@@ -1215,30 +1048,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) {
@@ -1404,30 +1218,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());
}
@@ -1460,30 +1255,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) {
@@ -1649,30 +1425,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());
}
@@ -1705,30 +1462,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) {
@@ -1893,25 +1631,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());
}
@@ -1943,25 +1665,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) {
@@ -2114,25 +1820,9 @@ public ServiceResponseWithHeaders call = service.getRemoteDesktop(poolId, nodeId, this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getRemoteDesktopDelegate(call.execute());
}
@@ -2164,25 +1854,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) {
@@ -2331,50 +2005,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());
@@ -2402,37 +2044,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) {
@@ -2443,14 +2060,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()));
}
@@ -2635,21 +2245,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());
}
@@ -2673,21 +2270,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) {
@@ -2698,7 +2282,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/FileOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperations.java
index 51172099b5b6..fbb56e77502b 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/FileOperations.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
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 01966cfce7ef..d0bc5e95b186 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
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
@@ -168,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());
}
@@ -224,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) {
@@ -410,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());
}
@@ -485,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) {
@@ -729,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());
}
@@ -800,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) {
@@ -1033,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());
}
@@ -1089,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) {
@@ -1275,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());
}
@@ -1350,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) {
@@ -1594,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());
}
@@ -1665,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) {
@@ -1894,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());
@@ -1967,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) {
@@ -2004,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()));
}
@@ -2207,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());
@@ -2280,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) {
@@ -2317,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()));
}
@@ -2512,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());
}
@@ -2550,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) {
@@ -2575,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()));
}
@@ -2701,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());
}
@@ -2739,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) {
@@ -2764,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/JobOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperations.java
index dd76fae0c248..ae325b4451a3 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobOperations.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
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 f7db4f309725..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
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
@@ -190,25 +176,9 @@ public ServiceResponseWithHeaders call = service.getAllJobsLifetimeStatistics(this.client.getApiVersion(), this.client.getAcceptLanguage(), timeout, clientRequestId, returnClientRequestId, ocpDateConverted);
return getAllJobsLifetimeStatisticsDelegate(call.execute());
}
@@ -230,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) {
@@ -379,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());
}
@@ -448,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) {
@@ -678,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());
}
@@ -731,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) {
@@ -918,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());
}
@@ -993,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) {
@@ -1239,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());
}
@@ -1314,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) {
@@ -1559,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());
}
@@ -1629,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) {
@@ -1880,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());
}
@@ -1949,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) {
@@ -2180,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());
}
@@ -2255,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) {
@@ -2503,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());
}
@@ -2549,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) {
@@ -2705,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());
@@ -2775,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) {
@@ -2820,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()));
}
@@ -3014,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());
@@ -3089,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) {
@@ -3134,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()));
}
@@ -3337,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());
@@ -3408,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) {
@@ -3449,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()));
}
@@ -3641,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());
}
@@ -3679,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) {
@@ -3704,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()));
}
@@ -3830,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());
}
@@ -3868,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) {
@@ -3893,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()));
}
@@ -4019,21 +3203,8 @@ public ServiceResponseWithHeaders call = service.listPreparationAndReleaseTaskStatusNext(nextPageLink, this.client.getAcceptLanguage(), clientRequestId, returnClientRequestId, ocpDateConverted);
return listPreparationAndReleaseTaskStatusNextDelegate(call.execute());
}
@@ -4057,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) {
@@ -4082,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/JobScheduleOperations.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperations.java
index 66a4a2e4afab..6cf676da2a75 100644
--- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperations.java
+++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/JobScheduleOperations.java
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
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 c26800bef438..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
@@ -1,21 +1,7 @@
/**
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * 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.protocol;
@@ -169,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());
}
@@ -242,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) {
@@ -485,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());
}
@@ -554,49 +426,13 @@ public ServiceCall deleteAsync(String jobScheduleId, final ServiceCallback