diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9a521662024d..3352c4744a3b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,13 +13,12 @@ /sdk/core/ @alzimmermsft @jianghaolu @srnagar @hemanttanwar /sdk/cosmos/ @moderakh @christopheranderson @kushagraThapar /sdk/eventhubs/ @conniey @srnagar @mssfang -/sdk/identity/ @jianghaolu @g2vinay +/sdk/identity/ @jianghaolu @g2vinay @hemanttanwar /sdk/keyvault/ @g2vinay @samvaity /sdk/servicebus/ @yvgopal @nemakam /sdk/tracing/ @samvaity @alzimmermsft -# TODO: Once storage libraries are migrated to /sdk folder, fix this line -/storage/ @rickle-msft @jaschrep-msft @alzimmermsft @sima-zhu +/sdk/storage/ @rickle-msft @jaschrep-msft @alzimmermsft @sima-zhu # Management Plane /**/resource-manager/ @yaohaizh @@ -28,5 +27,6 @@ # Eng Sys ########### /eng/ @weshaggard @mitchdenny @danieljurek +/eng/code-quality-reports/ @mssfang @JonathanGiles /**/tests.yml @danieljurek /**/ci.yml @mitchdenny diff --git a/batch/resource-manager/v2017_09_01/pom.xml b/batch/resource-manager/v2017_09_01/pom.xml new file mode 100644 index 000000000000..884298fdebcd --- /dev/null +++ b/batch/resource-manager/v2017_09_01/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.batch.v2017_09_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-batch + 1.0.0-beta + jar + Microsoft Azure SDK for Batch Management + This package contains Microsoft Batch Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AccountKeyType.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AccountKeyType.java new file mode 100644 index 000000000000..e4dd9f18dc65 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AccountKeyType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccountKeyType. + */ +public enum AccountKeyType { + /** Enum value Primary. */ + PRIMARY("Primary"), + + /** Enum value Secondary. */ + SECONDARY("Secondary"); + + /** The actual serialized value for a AccountKeyType instance. */ + private String value; + + AccountKeyType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccountKeyType instance. + * + * @param value the serialized value to parse. + * @return the parsed AccountKeyType object, or null if unable to parse. + */ + @JsonCreator + public static AccountKeyType fromString(String value) { + AccountKeyType[] items = AccountKeyType.values(); + for (AccountKeyType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ActivateApplicationPackageParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ActivateApplicationPackageParameters.java new file mode 100644 index 000000000000..1abf97254588 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ActivateApplicationPackageParameters.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for an activating an application package. + */ +public class ActivateApplicationPackageParameters { + /** + * The format of the application package binary file. + */ + @JsonProperty(value = "format", required = true) + private String format; + + /** + * Get the format of the application package binary file. + * + * @return the format value + */ + public String format() { + return this.format; + } + + /** + * Set the format of the application package binary file. + * + * @param format the format value to set + * @return the ActivateApplicationPackageParameters object itself. + */ + public ActivateApplicationPackageParameters withFormat(String format) { + this.format = format; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AllocationState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AllocationState.java new file mode 100644 index 000000000000..35507c2d994a --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AllocationState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AllocationState. + */ +public enum AllocationState { + /** Enum value Steady. */ + STEADY("Steady"), + + /** Enum value Resizing. */ + RESIZING("Resizing"), + + /** Enum value Stopping. */ + STOPPING("Stopping"); + + /** The actual serialized value for a AllocationState instance. */ + private String value; + + AllocationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AllocationState instance. + * + * @param value the serialized value to parse. + * @return the parsed AllocationState object, or null if unable to parse. + */ + @JsonCreator + public static AllocationState fromString(String value) { + AllocationState[] items = AllocationState.values(); + for (AllocationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Application.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Application.java new file mode 100644 index 000000000000..01d168c447fa --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Application.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.ApplicationInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import java.util.List; + +/** + * Type representing Application. + */ +public interface Application extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the allowUpdates value. + */ + Boolean allowUpdates(); + + /** + * @return the defaultVersion value. + */ + String defaultVersion(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the packages value. + */ + List packages(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationCreateParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationCreateParameters.java new file mode 100644 index 000000000000..52b885fbc5e4 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationCreateParameters.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for adding an Application. + */ +public class ApplicationCreateParameters { + /** + * A value indicating whether packages within the application may be + * overwritten using the same version string. + */ + @JsonProperty(value = "allowUpdates") + private Boolean allowUpdates; + + /** + * The display name for the application. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get a value indicating whether packages within the application may be overwritten using the same version string. + * + * @return the allowUpdates value + */ + public Boolean allowUpdates() { + return this.allowUpdates; + } + + /** + * Set a value indicating whether packages within the application may be overwritten using the same version string. + * + * @param allowUpdates the allowUpdates value to set + * @return the ApplicationCreateParameters object itself. + */ + public ApplicationCreateParameters withAllowUpdates(Boolean allowUpdates) { + this.allowUpdates = allowUpdates; + return this; + } + + /** + * Get the display name for the application. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the application. + * + * @param displayName the displayName value to set + * @return the ApplicationCreateParameters object itself. + */ + public ApplicationCreateParameters withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackage.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackage.java new file mode 100644 index 000000000000..58ae2193d054 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackage.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.ApplicationPackageInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import org.joda.time.DateTime; + +/** + * Type representing ApplicationPackage. + */ +public interface ApplicationPackage extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the format value. + */ + String format(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastActivationTime value. + */ + DateTime lastActivationTime(); + + /** + * @return the state value. + */ + PackageState state(); + + /** + * @return the storageUrl value. + */ + String storageUrl(); + + /** + * @return the storageUrlExpiry value. + */ + DateTime storageUrlExpiry(); + + /** + * @return the version value. + */ + String version(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackageReference.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackageReference.java new file mode 100644 index 000000000000..fd8ee6224078 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackageReference.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Link to an application package inside the batch account. + */ +public class ApplicationPackageReference { + /** + * The ID of the application package to install. This must be inside the + * same batch account as the pool. This can either be a reference to a + * specific version or the default version if one exists. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The version of the application to deploy. If omitted, the default + * version is deployed. + * If this is omitted, and no default version is specified for this + * application, the request fails with the error code + * InvalidApplicationPackageReferences. If you are calling the REST API + * directly, the HTTP status code is 409. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the ApplicationPackageReference object itself. + */ + public ApplicationPackageReference withId(String id) { + this.id = id; + return this; + } + + /** + * Get if this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set if this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. + * + * @param version the version value to set + * @return the ApplicationPackageReference object itself. + */ + public ApplicationPackageReference withVersion(String version) { + this.version = version; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackages.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackages.java new file mode 100644 index 000000000000..5f6877a0b185 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationPackages.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.ApplicationPackagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ApplicationPackages. + */ +public interface ApplicationPackages extends HasInner { + /** + * Activates the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to activate. + * @param format The format of the application package binary file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format); + + /** + * Creates an application package record. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version); + + /** + * Gets information about the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version); + + /** + * Deletes an application package record and its associated binary file. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationUpdateParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationUpdateParameters.java new file mode 100644 index 000000000000..26d4f8215aa6 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ApplicationUpdateParameters.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for an update application request. + */ +public class ApplicationUpdateParameters { + /** + * A value indicating whether packages within the application may be + * overwritten using the same version string. + */ + @JsonProperty(value = "allowUpdates") + private Boolean allowUpdates; + + /** + * The package to use if a client requests the application but does not + * specify a version. + */ + @JsonProperty(value = "defaultVersion") + private String defaultVersion; + + /** + * The display name for the application. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get a value indicating whether packages within the application may be overwritten using the same version string. + * + * @return the allowUpdates value + */ + public Boolean allowUpdates() { + return this.allowUpdates; + } + + /** + * Set a value indicating whether packages within the application may be overwritten using the same version string. + * + * @param allowUpdates the allowUpdates value to set + * @return the ApplicationUpdateParameters object itself. + */ + public ApplicationUpdateParameters withAllowUpdates(Boolean allowUpdates) { + this.allowUpdates = allowUpdates; + return this; + } + + /** + * Get the package to use if a client requests the application but does not specify a version. + * + * @return the defaultVersion value + */ + public String defaultVersion() { + return this.defaultVersion; + } + + /** + * Set the package to use if a client requests the application but does not specify a version. + * + * @param defaultVersion the defaultVersion value to set + * @return the ApplicationUpdateParameters object itself. + */ + public ApplicationUpdateParameters withDefaultVersion(String defaultVersion) { + this.defaultVersion = defaultVersion; + return this; + } + + /** + * Get the display name for the application. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the application. + * + * @param displayName the displayName value to set + * @return the ApplicationUpdateParameters object itself. + */ + public ApplicationUpdateParameters withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Applications.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Applications.java new file mode 100644 index 000000000000..054966d71d0d --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Applications.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.ApplicationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Applications. + */ +public interface Applications extends HasInner { + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createAsync(String resourceGroupName, String accountName, String applicationId); + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable updateAsync(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters); + + /** + * Gets information about the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String applicationId); + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String applicationId); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRun.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRun.java new file mode 100644 index 000000000000..5ca3a7f2e9cb --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRun.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The results and errors from an execution of a pool autoscale formula. + */ +public class AutoScaleRun { + /** + * The time at which the autoscale formula was last evaluated. + */ + @JsonProperty(value = "evaluationTime", required = true) + private DateTime evaluationTime; + + /** + * The final values of all variables used in the evaluation of the + * autoscale formula. + * Each variable value is returned in the form $variable=value, and + * variables are separated by semicolons. + */ + @JsonProperty(value = "results") + private String results; + + /** + * Details of the error encountered evaluating the autoscale formula on the + * pool, if the evaluation was unsuccessful. + */ + @JsonProperty(value = "error") + private AutoScaleRunError error; + + /** + * Get the evaluationTime value. + * + * @return the evaluationTime value + */ + public DateTime evaluationTime() { + return this.evaluationTime; + } + + /** + * Set the evaluationTime value. + * + * @param evaluationTime the evaluationTime value to set + * @return the AutoScaleRun object itself. + */ + public AutoScaleRun withEvaluationTime(DateTime evaluationTime) { + this.evaluationTime = evaluationTime; + return this; + } + + /** + * Get each variable value is returned in the form $variable=value, and variables are separated by semicolons. + * + * @return the results value + */ + public String results() { + return this.results; + } + + /** + * Set each variable value is returned in the form $variable=value, and variables are separated by semicolons. + * + * @param results the results value to set + * @return the AutoScaleRun object itself. + */ + public AutoScaleRun withResults(String results) { + this.results = results; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public AutoScaleRunError error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the AutoScaleRun object itself. + */ + public AutoScaleRun withError(AutoScaleRunError error) { + this.error = error; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRunError.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRunError.java new file mode 100644 index 000000000000..8f7c55f792eb --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleRunError.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error that occurred when autoscaling a pool. + */ +public class AutoScaleRunError { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * Additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the AutoScaleRunError object itself. + */ + public AutoScaleRunError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the AutoScaleRunError object itself. + */ + public AutoScaleRunError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the AutoScaleRunError object itself. + */ + public AutoScaleRunError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleSettings.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleSettings.java new file mode 100644 index 000000000000..695ced53b037 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoScaleSettings.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutoScale settings for the pool. + */ +public class AutoScaleSettings { + /** + * A formula for the desired number of compute nodes in the pool. + */ + @JsonProperty(value = "formula", required = true) + private String formula; + + /** + * The time interval at which to automatically adjust the pool size + * according to the autoscale formula. + * If omitted, the default value is 15 minutes (PT15M). + */ + @JsonProperty(value = "evaluationInterval") + private Period evaluationInterval; + + /** + * Get the formula value. + * + * @return the formula value + */ + public String formula() { + return this.formula; + } + + /** + * Set the formula value. + * + * @param formula the formula value to set + * @return the AutoScaleSettings object itself. + */ + public AutoScaleSettings withFormula(String formula) { + this.formula = formula; + return this; + } + + /** + * Get if omitted, the default value is 15 minutes (PT15M). + * + * @return the evaluationInterval value + */ + public Period evaluationInterval() { + return this.evaluationInterval; + } + + /** + * Set if omitted, the default value is 15 minutes (PT15M). + * + * @param evaluationInterval the evaluationInterval value to set + * @return the AutoScaleSettings object itself. + */ + public AutoScaleSettings withEvaluationInterval(Period evaluationInterval) { + this.evaluationInterval = evaluationInterval; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageBaseProperties.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageBaseProperties.java new file mode 100644 index 000000000000..7c0edd496ff9 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageBaseProperties.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties related to the auto-storage account. + */ +public class AutoStorageBaseProperties { + /** + * The resource ID of the storage account to be used for auto-storage + * account. + */ + @JsonProperty(value = "storageAccountId", required = true) + private String storageAccountId; + + /** + * Get the resource ID of the storage account to be used for auto-storage account. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the resource ID of the storage account to be used for auto-storage account. + * + * @param storageAccountId the storageAccountId value to set + * @return the AutoStorageBaseProperties object itself. + */ + public AutoStorageBaseProperties withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageProperties.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageProperties.java new file mode 100644 index 000000000000..ffe94d7d0dff --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoStorageProperties.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about the auto-storage account associated with a Batch + * account. + */ +public class AutoStorageProperties extends AutoStorageBaseProperties { + /** + * The UTC time at which storage keys were last synchronized with the Batch + * account. + */ + @JsonProperty(value = "lastKeySync", required = true) + private DateTime lastKeySync; + + /** + * Get the UTC time at which storage keys were last synchronized with the Batch account. + * + * @return the lastKeySync value + */ + public DateTime lastKeySync() { + return this.lastKeySync; + } + + /** + * Set the UTC time at which storage keys were last synchronized with the Batch account. + * + * @param lastKeySync the lastKeySync value to set + * @return the AutoStorageProperties object itself. + */ + public AutoStorageProperties withLastKeySync(DateTime lastKeySync) { + this.lastKeySync = lastKeySync; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserScope.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserScope.java new file mode 100644 index 000000000000..6db5d2b650d8 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserScope.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AutoUserScope. + */ +public enum AutoUserScope { + /** Enum value Task. */ + TASK("Task"), + + /** Enum value Pool. */ + POOL("Pool"); + + /** The actual serialized value for a AutoUserScope instance. */ + private String value; + + AutoUserScope(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AutoUserScope instance. + * + * @param value the serialized value to parse. + * @return the parsed AutoUserScope object, or null if unable to parse. + */ + @JsonCreator + public static AutoUserScope fromString(String value) { + AutoUserScope[] items = AutoUserScope.values(); + for (AutoUserScope item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserSpecification.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserSpecification.java new file mode 100644 index 000000000000..8bc5de547693 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/AutoUserSpecification.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies the parameters for the auto user that runs a task on the Batch + * service. + */ +public class AutoUserSpecification { + /** + * The scope for the auto user. + * pool - specifies that the task runs as the common auto user account + * which is created on every node in a pool. task - specifies that the + * service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool'. + */ + @JsonProperty(value = "scope") + private AutoUserScope scope; + + /** + * The elevation level of the auto user. + * nonAdmin - The auto user is a standard user without elevated access. + * admin - The auto user is a user with elevated access and operates with + * full Administrator permissions. The default value is nonAdmin. Possible + * values include: 'NonAdmin', 'Admin'. + */ + @JsonProperty(value = "elevationLevel") + private ElevationLevel elevationLevel; + + /** + * Get pool - specifies that the task runs as the common auto user account which is created on every node in a pool. task - specifies that the service should create a new user for the task. The default value is task. Possible values include: 'Task', 'Pool'. + * + * @return the scope value + */ + public AutoUserScope scope() { + return this.scope; + } + + /** + * Set pool - specifies that the task runs as the common auto user account which is created on every node in a pool. task - specifies that the service should create a new user for the task. The default value is task. Possible values include: 'Task', 'Pool'. + * + * @param scope the scope value to set + * @return the AutoUserSpecification object itself. + */ + public AutoUserSpecification withScope(AutoUserScope scope) { + this.scope = scope; + return this; + } + + /** + * Get nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'. + * + * @return the elevationLevel value + */ + public ElevationLevel elevationLevel() { + return this.elevationLevel; + } + + /** + * Set nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'. + * + * @param elevationLevel the elevationLevel value to set + * @return the AutoUserSpecification object itself. + */ + public AutoUserSpecification withElevationLevel(ElevationLevel elevationLevel) { + this.elevationLevel = elevationLevel; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccount.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccount.java new file mode 100644 index 000000000000..855ad5908185 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccount.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchAccountInner; + +/** + * Type representing BatchAccount. + */ +public interface BatchAccount extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the accountEndpoint value. + */ + String accountEndpoint(); + + /** + * @return the activeJobAndJobScheduleQuota value. + */ + int activeJobAndJobScheduleQuota(); + + /** + * @return the autoStorage value. + */ + AutoStorageProperties autoStorage(); + + /** + * @return the dedicatedCoreQuota value. + */ + int dedicatedCoreQuota(); + + /** + * @return the keyVaultReference value. + */ + KeyVaultReference keyVaultReference(); + + /** + * @return the lowPriorityCoreQuota value. + */ + int lowPriorityCoreQuota(); + + /** + * @return the poolAllocationMode value. + */ + PoolAllocationMode poolAllocationMode(); + + /** + * @return the poolQuota value. + */ + int poolQuota(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * The entirety of the BatchAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of BatchAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a BatchAccount definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the BatchAccount definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the batchaccount definition allowing to specify AutoStorage. + */ + interface WithAutoStorage { + /** + * Specifies autoStorage. + * @param autoStorage The properties related to the auto-storage account + * @return the next definition stage + */ + WithCreate withAutoStorage(AutoStorageBaseProperties autoStorage); + } + + /** + * The stage of the batchaccount definition allowing to specify KeyVaultReference. + */ + interface WithKeyVaultReference { + /** + * Specifies keyVaultReference. + * @param keyVaultReference A reference to the Azure key vault associated with the Batch account + * @return the next definition stage + */ + WithCreate withKeyVaultReference(KeyVaultReference keyVaultReference); + } + + /** + * The stage of the batchaccount definition allowing to specify PoolAllocationMode. + */ + interface WithPoolAllocationMode { + /** + * Specifies poolAllocationMode. + * @param poolAllocationMode The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. Possible values include: 'BatchService', 'UserSubscription' + * @return the next definition stage + */ + WithCreate withPoolAllocationMode(PoolAllocationMode poolAllocationMode); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAutoStorage, DefinitionStages.WithKeyVaultReference, DefinitionStages.WithPoolAllocationMode { + } + } + /** + * The template for a BatchAccount update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoStorage { + } + + /** + * Grouping of BatchAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the batchaccount update allowing to specify AutoStorage. + */ + interface WithAutoStorage { + /** + * Specifies autoStorage. + * @param autoStorage The properties related to the auto-storage account + * @return the next update stage + */ + Update withAutoStorage(AutoStorageBaseProperties autoStorage); + } + + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateHeaders.java new file mode 100644 index 000000000000..11fad7df0b40 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateHeaders.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Create operation. + */ +public class BatchAccountCreateHeaders { + /** + * The URL of the resource used to check the status of the asynchronous + * operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Suggested delay to check the status of the asynchronous operation. The + * value is an integer that specifies the delay in seconds. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /** + * Get the URL of the resource used to check the status of the asynchronous operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the URL of the resource used to check the status of the asynchronous operation. + * + * @param location the location value to set + * @return the BatchAccountCreateHeaders object itself. + */ + public BatchAccountCreateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get suggested delay to check the status of the asynchronous operation. The value is an integer that specifies the delay in seconds. + * + * @return the retryAfter value + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set suggested delay to check the status of the asynchronous operation. The value is an integer that specifies the delay in seconds. + * + * @param retryAfter the retryAfter value to set + * @return the BatchAccountCreateHeaders object itself. + */ + public BatchAccountCreateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateParameters.java new file mode 100644 index 000000000000..dfe89901d7e6 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountCreateParameters.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters supplied to the Create operation. + */ +@JsonFlatten +public class BatchAccountCreateParameters { + /** + * The region in which to create the account. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The user-specified tags associated with the account. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The properties related to the auto-storage account. + */ + @JsonProperty(value = "properties.autoStorage") + private AutoStorageBaseProperties autoStorage; + + /** + * The allocation mode to use for creating pools in the Batch account. + * The pool allocation mode also affects how clients may authenticate to + * the Batch Service API. If the mode is BatchService, clients may + * authenticate using access keys or Azure Active Directory. If the mode is + * UserSubscription, clients must use Azure Active Directory. The default + * is BatchService. Possible values include: 'BatchService', + * 'UserSubscription'. + */ + @JsonProperty(value = "properties.poolAllocationMode") + private PoolAllocationMode poolAllocationMode; + + /** + * A reference to the Azure key vault associated with the Batch account. + */ + @JsonProperty(value = "properties.keyVaultReference") + private KeyVaultReference keyVaultReference; + + /** + * Get the region in which to create the account. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the region in which to create the account. + * + * @param location the location value to set + * @return the BatchAccountCreateParameters object itself. + */ + public BatchAccountCreateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the user-specified tags associated with the account. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the user-specified tags associated with the account. + * + * @param tags the tags value to set + * @return the BatchAccountCreateParameters object itself. + */ + public BatchAccountCreateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties related to the auto-storage account. + * + * @return the autoStorage value + */ + public AutoStorageBaseProperties autoStorage() { + return this.autoStorage; + } + + /** + * Set the properties related to the auto-storage account. + * + * @param autoStorage the autoStorage value to set + * @return the BatchAccountCreateParameters object itself. + */ + public BatchAccountCreateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) { + this.autoStorage = autoStorage; + return this; + } + + /** + * Get the pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. Possible values include: 'BatchService', 'UserSubscription'. + * + * @return the poolAllocationMode value + */ + public PoolAllocationMode poolAllocationMode() { + return this.poolAllocationMode; + } + + /** + * Set the pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. Possible values include: 'BatchService', 'UserSubscription'. + * + * @param poolAllocationMode the poolAllocationMode value to set + * @return the BatchAccountCreateParameters object itself. + */ + public BatchAccountCreateParameters withPoolAllocationMode(PoolAllocationMode poolAllocationMode) { + this.poolAllocationMode = poolAllocationMode; + return this; + } + + /** + * Get a reference to the Azure key vault associated with the Batch account. + * + * @return the keyVaultReference value + */ + public KeyVaultReference keyVaultReference() { + return this.keyVaultReference; + } + + /** + * Set a reference to the Azure key vault associated with the Batch account. + * + * @param keyVaultReference the keyVaultReference value to set + * @return the BatchAccountCreateParameters object itself. + */ + public BatchAccountCreateParameters withKeyVaultReference(KeyVaultReference keyVaultReference) { + this.keyVaultReference = keyVaultReference; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountDeleteHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountDeleteHeaders.java new file mode 100644 index 000000000000..dfc436f1d07e --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountDeleteHeaders.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +public class BatchAccountDeleteHeaders { + /** + * The URL of the resource used to check the status of the asynchronous + * operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Suggested delay to check the status of the asynchronous operation. The + * value is an integer that specifies the delay in seconds. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /** + * Get the URL of the resource used to check the status of the asynchronous operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the URL of the resource used to check the status of the asynchronous operation. + * + * @param location the location value to set + * @return the BatchAccountDeleteHeaders object itself. + */ + public BatchAccountDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get suggested delay to check the status of the asynchronous operation. The value is an integer that specifies the delay in seconds. + * + * @return the retryAfter value + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set suggested delay to check the status of the asynchronous operation. The value is an integer that specifies the delay in seconds. + * + * @param retryAfter the retryAfter value to set + * @return the BatchAccountDeleteHeaders object itself. + */ + public BatchAccountDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountKeys.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountKeys.java new file mode 100644 index 000000000000..28744b954cdf --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountKeys.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchAccountKeysInner; + +/** + * Type representing BatchAccountKeys. + */ +public interface BatchAccountKeys extends HasInner, HasManager { + /** + * @return the accountName value. + */ + String accountName(); + + /** + * @return the primary value. + */ + String primary(); + + /** + * @return the secondary value. + */ + String secondary(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountRegenerateKeyParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountRegenerateKeyParameters.java new file mode 100644 index 000000000000..d66bd27c15ee --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountRegenerateKeyParameters.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to the RegenerateKey operation. + */ +public class BatchAccountRegenerateKeyParameters { + /** + * The type of account key to regenerate. Possible values include: + * 'Primary', 'Secondary'. + */ + @JsonProperty(value = "keyName", required = true) + private AccountKeyType keyName; + + /** + * Get the type of account key to regenerate. Possible values include: 'Primary', 'Secondary'. + * + * @return the keyName value + */ + public AccountKeyType keyName() { + return this.keyName; + } + + /** + * Set the type of account key to regenerate. Possible values include: 'Primary', 'Secondary'. + * + * @param keyName the keyName value to set + * @return the BatchAccountRegenerateKeyParameters object itself. + */ + public BatchAccountRegenerateKeyParameters withKeyName(AccountKeyType keyName) { + this.keyName = keyName; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountUpdateParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountUpdateParameters.java new file mode 100644 index 000000000000..9505aa40ed21 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccountUpdateParameters.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Parameters for updating an Azure Batch account. + */ +@JsonFlatten +public class BatchAccountUpdateParameters { + /** + * The user-specified tags associated with the account. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The properties related to the auto-storage account. + */ + @JsonProperty(value = "properties.autoStorage") + private AutoStorageBaseProperties autoStorage; + + /** + * Get the user-specified tags associated with the account. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the user-specified tags associated with the account. + * + * @param tags the tags value to set + * @return the BatchAccountUpdateParameters object itself. + */ + public BatchAccountUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties related to the auto-storage account. + * + * @return the autoStorage value + */ + public AutoStorageBaseProperties autoStorage() { + return this.autoStorage; + } + + /** + * Set the properties related to the auto-storage account. + * + * @param autoStorage the autoStorage value to set + * @return the BatchAccountUpdateParameters object itself. + */ + public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties autoStorage) { + this.autoStorage = autoStorage; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccounts.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccounts.java new file mode 100644 index 000000000000..e3220b32cc79 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchAccounts.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchAccountsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing BatchAccounts. + */ +public interface BatchAccounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Synchronizes access keys for the auto-storage account configured for the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName); + + /** + * Regenerates the specified account key for the Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName); + + /** + * Gets the account keys for the specified Batch account. + * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getKeysAsync(String resourceGroupName, String accountName); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchLocationQuota.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchLocationQuota.java new file mode 100644 index 000000000000..d92a78a9d057 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/BatchLocationQuota.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchLocationQuotaInner; + +/** + * Type representing BatchLocationQuota. + */ +public interface BatchLocationQuota extends HasInner, HasManager { + /** + * @return the accountQuota value. + */ + Integer accountQuota(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CachingType.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CachingType.java new file mode 100644 index 000000000000..1e083fa9cbc0 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CachingType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CachingType. + */ +public enum CachingType { + /** Enum value None. */ + NONE("None"), + + /** Enum value ReadOnly. */ + READ_ONLY("ReadOnly"), + + /** Enum value ReadWrite. */ + READ_WRITE("ReadWrite"); + + /** The actual serialized value for a CachingType instance. */ + private String value; + + CachingType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CachingType instance. + * + * @param value the serialized value to parse. + * @return the parsed CachingType object, or null if unable to parse. + */ + @JsonCreator + public static CachingType fromString(String value) { + CachingType[] items = CachingType.values(); + for (CachingType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificate.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificate.java new file mode 100644 index 000000000000..b9c36cccafbe --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificate.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.CertificateInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import org.joda.time.DateTime; + +/** + * Type representing Certificate. + */ +public interface Certificate extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the deleteCertificateError value. + */ + DeleteCertificateError deleteCertificateError(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the format value. + */ + CertificateFormat format(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the previousProvisioningState value. + */ + CertificateProvisioningState previousProvisioningState(); + + /** + * @return the previousProvisioningStateTransitionTime value. + */ + DateTime previousProvisioningStateTransitionTime(); + + /** + * @return the provisioningState value. + */ + CertificateProvisioningState provisioningState(); + + /** + * @return the provisioningStateTransitionTime value. + */ + DateTime provisioningStateTransitionTime(); + + /** + * @return the publicData value. + */ + String publicData(); + + /** + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * @return the thumbprintAlgorithm value. + */ + String thumbprintAlgorithm(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Certificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithBatchAccount, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch, DefinitionStages.WithData, DefinitionStages.WithCreate { + } + + /** + * Grouping of Certificate definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Certificate definition. + */ + interface Blank extends WithBatchAccount { + } + + /** + * The stage of the certificate definition allowing to specify BatchAccount. + */ + interface WithBatchAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group that contains the Batch account + * @param accountName The name of the Batch account + * @return the next definition stage + */ + WithIfMatch withExistingBatchAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the certificate definition allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied + * @return the next definition stage + */ + WithIfNoneMatch withIfMatch(String ifMatch); + } + + /** + * The stage of the certificate definition allowing to specify IfNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies ifNoneMatch. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored + * @return the next definition stage + */ + WithData withIfNoneMatch(String ifNoneMatch); + } + + /** + * The stage of the certificate definition allowing to specify Data. + */ + interface WithData { + /** + * Specifies data. + * @param data The maximum size is 10KB + * @return the next definition stage + */ + WithCreate withData(String data); + } + + /** + * The stage of the certificate definition allowing to specify Format. + */ + interface WithFormat { + /** + * Specifies format. + * @param format The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + * @return the next definition stage + */ + WithCreate withFormat(CertificateFormat format); + } + + /** + * The stage of the certificate definition allowing to specify Password. + */ + interface WithPassword { + /** + * Specifies password. + * @param password This is required if the certificate format is pfx and must be omitted if the certificate format is cer + * @return the next definition stage + */ + WithCreate withPassword(String password); + } + + /** + * The stage of the certificate definition allowing to specify Thumbprint. + */ + interface WithThumbprint { + /** + * Specifies thumbprint. + * @param thumbprint This must match the thumbprint from the name + * @return the next definition stage + */ + WithCreate withThumbprint(String thumbprint); + } + + /** + * The stage of the certificate definition allowing to specify ThumbprintAlgorithm. + */ + interface WithThumbprintAlgorithm { + /** + * Specifies thumbprintAlgorithm. + * @param thumbprintAlgorithm This must match the first portion of the certificate name. Currently required to be 'SHA1' + * @return the next definition stage + */ + WithCreate withThumbprintAlgorithm(String thumbprintAlgorithm); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithFormat, DefinitionStages.WithPassword, DefinitionStages.WithThumbprint, DefinitionStages.WithThumbprintAlgorithm { + } + } + /** + * The template for a Certificate update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithFormat, UpdateStages.WithPassword, UpdateStages.WithThumbprint, UpdateStages.WithThumbprintAlgorithm { + } + + /** + * Grouping of Certificate update stages. + */ + interface UpdateStages { + /** + * The stage of the certificate update allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation unconditionally + * @return the next update stage + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the certificate update allowing to specify Format. + */ + interface WithFormat { + /** + * Specifies format. + * @param format The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + * @return the next update stage + */ + Update withFormat(CertificateFormat format); + } + + /** + * The stage of the certificate update allowing to specify Password. + */ + interface WithPassword { + /** + * Specifies password. + * @param password This is required if the certificate format is pfx and must be omitted if the certificate format is cer + * @return the next update stage + */ + Update withPassword(String password); + } + + /** + * The stage of the certificate update allowing to specify Thumbprint. + */ + interface WithThumbprint { + /** + * Specifies thumbprint. + * @param thumbprint This must match the thumbprint from the name + * @return the next update stage + */ + Update withThumbprint(String thumbprint); + } + + /** + * The stage of the certificate update allowing to specify ThumbprintAlgorithm. + */ + interface WithThumbprintAlgorithm { + /** + * Specifies thumbprintAlgorithm. + * @param thumbprintAlgorithm This must match the first portion of the certificate name. Currently required to be 'SHA1' + * @return the next update stage + */ + Update withThumbprintAlgorithm(String thumbprintAlgorithm); + } + + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateBaseProperties.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateBaseProperties.java new file mode 100644 index 000000000000..42c8a6eb72dc --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateBaseProperties.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CertificateBaseProperties model. + */ +public class CertificateBaseProperties { + /** + * The algorithm of the certificate thumbprint. + * This must match the first portion of the certificate name. Currently + * required to be 'SHA1'. + */ + @JsonProperty(value = "thumbprintAlgorithm") + private String thumbprintAlgorithm; + + /** + * The thumbprint of the certificate. + * This must match the thumbprint from the name. + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /** + * The format of the certificate - either Pfx or Cer. If omitted, the + * default is Pfx. Possible values include: 'Pfx', 'Cer'. + */ + @JsonProperty(value = "format") + private CertificateFormat format; + + /** + * Get this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @return the thumbprintAlgorithm value + */ + public String thumbprintAlgorithm() { + return this.thumbprintAlgorithm; + } + + /** + * Set this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @param thumbprintAlgorithm the thumbprintAlgorithm value to set + * @return the CertificateBaseProperties object itself. + */ + public CertificateBaseProperties withThumbprintAlgorithm(String thumbprintAlgorithm) { + this.thumbprintAlgorithm = thumbprintAlgorithm; + return this; + } + + /** + * Get this must match the thumbprint from the name. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set this must match the thumbprint from the name. + * + * @param thumbprint the thumbprint value to set + * @return the CertificateBaseProperties object itself. + */ + public CertificateBaseProperties withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @return the format value + */ + public CertificateFormat format() { + return this.format; + } + + /** + * Set the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @param format the format value to set + * @return the CertificateBaseProperties object itself. + */ + public CertificateBaseProperties withFormat(CertificateFormat format) { + this.format = format; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCancelDeletionHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCancelDeletionHeaders.java new file mode 100644 index 000000000000..ee0be6402d5e --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCancelDeletionHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for CancelDeletion operation. + */ +public class CertificateCancelDeletionHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the CertificateCancelDeletionHeaders object itself. + */ + public CertificateCancelDeletionHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateHeaders.java new file mode 100644 index 000000000000..6c09e22e9ed4 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Create operation. + */ +public class CertificateCreateHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the CertificateCreateHeaders object itself. + */ + public CertificateCreateHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateOrUpdateParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateOrUpdateParameters.java new file mode 100644 index 000000000000..edfc93d0d14c --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateCreateOrUpdateParameters.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Contains information about a certificate. + */ +@JsonFlatten +public class CertificateCreateOrUpdateParameters extends ProxyResource { + /** + * The algorithm of the certificate thumbprint. + * This must match the first portion of the certificate name. Currently + * required to be 'SHA1'. + */ + @JsonProperty(value = "properties.thumbprintAlgorithm") + private String thumbprintAlgorithm; + + /** + * The thumbprint of the certificate. + * This must match the thumbprint from the name. + */ + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; + + /** + * The format of the certificate - either Pfx or Cer. If omitted, the + * default is Pfx. Possible values include: 'Pfx', 'Cer'. + */ + @JsonProperty(value = "properties.format") + private CertificateFormat format; + + /** + * The base64-encoded contents of the certificate. + * The maximum size is 10KB. + */ + @JsonProperty(value = "properties.data", required = true) + private String data; + + /** + * The password to access the certificate's private key. + * This is required if the certificate format is pfx and must be omitted if + * the certificate format is cer. + */ + @JsonProperty(value = "properties.password") + private String password; + + /** + * The ETag of the resource, used for concurrency statements. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @return the thumbprintAlgorithm value + */ + public String thumbprintAlgorithm() { + return this.thumbprintAlgorithm; + } + + /** + * Set this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @param thumbprintAlgorithm the thumbprintAlgorithm value to set + * @return the CertificateCreateOrUpdateParameters object itself. + */ + public CertificateCreateOrUpdateParameters withThumbprintAlgorithm(String thumbprintAlgorithm) { + this.thumbprintAlgorithm = thumbprintAlgorithm; + return this; + } + + /** + * Get this must match the thumbprint from the name. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set this must match the thumbprint from the name. + * + * @param thumbprint the thumbprint value to set + * @return the CertificateCreateOrUpdateParameters object itself. + */ + public CertificateCreateOrUpdateParameters withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @return the format value + */ + public CertificateFormat format() { + return this.format; + } + + /** + * Set the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @param format the format value to set + * @return the CertificateCreateOrUpdateParameters object itself. + */ + public CertificateCreateOrUpdateParameters withFormat(CertificateFormat format) { + this.format = format; + return this; + } + + /** + * Get the maximum size is 10KB. + * + * @return the data value + */ + public String data() { + return this.data; + } + + /** + * Set the maximum size is 10KB. + * + * @param data the data value to set + * @return the CertificateCreateOrUpdateParameters object itself. + */ + public CertificateCreateOrUpdateParameters withData(String data) { + this.data = data; + return this; + } + + /** + * Get this is required if the certificate format is pfx and must be omitted if the certificate format is cer. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set this is required if the certificate format is pfx and must be omitted if the certificate format is cer. + * + * @param password the password value to set + * @return the CertificateCreateOrUpdateParameters object itself. + */ + public CertificateCreateOrUpdateParameters withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the ETag of the resource, used for concurrency statements. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateDeleteHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateDeleteHeaders.java new file mode 100644 index 000000000000..a9c06eb4485b --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateDeleteHeaders.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +public class CertificateDeleteHeaders { + /** + * The URL of the resource used to check the status of the asynchronous + * operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Suggested delay to check the status of the asynchronous operation. The + * value is an integer that represents the seconds. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /** + * Get the URL of the resource used to check the status of the asynchronous operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the URL of the resource used to check the status of the asynchronous operation. + * + * @param location the location value to set + * @return the CertificateDeleteHeaders object itself. + */ + public CertificateDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. + * + * @return the retryAfter value + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. + * + * @param retryAfter the retryAfter value to set + * @return the CertificateDeleteHeaders object itself. + */ + public CertificateDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateFormat.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateFormat.java new file mode 100644 index 000000000000..6724cd3b7008 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateFormat.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateFormat. + */ +public enum CertificateFormat { + /** Enum value Pfx. */ + PFX("Pfx"), + + /** Enum value Cer. */ + CER("Cer"); + + /** The actual serialized value for a CertificateFormat instance. */ + private String value; + + CertificateFormat(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateFormat instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateFormat object, or null if unable to parse. + */ + @JsonCreator + public static CertificateFormat fromString(String value) { + CertificateFormat[] items = CertificateFormat.values(); + for (CertificateFormat item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateGetHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateGetHeaders.java new file mode 100644 index 000000000000..643875d49392 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateGetHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Get operation. + */ +public class CertificateGetHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the CertificateGetHeaders object itself. + */ + public CertificateGetHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateProvisioningState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateProvisioningState.java new file mode 100644 index 000000000000..6b76eea11aa9 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateProvisioningState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateProvisioningState. + */ +public enum CertificateProvisioningState { + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a CertificateProvisioningState instance. */ + private String value; + + CertificateProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static CertificateProvisioningState fromString(String value) { + CertificateProvisioningState[] items = CertificateProvisioningState.values(); + for (CertificateProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateReference.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateReference.java new file mode 100644 index 000000000000..6b43af8284c5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateReference.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A reference to a certificate to be installed on compute nodes in a pool. + * This must exist inside the same account as the pool. + */ +public class CertificateReference { + /** + * The fully qualified ID of the certificate to install on the pool. This + * must be inside the same batch account as the pool. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The location of the certificate store on the compute node into which to + * install the certificate. + * The default value is currentUser. This property is applicable only for + * pools configured with Windows nodes (that is, created with + * cloudServiceConfiguration, or with virtualMachineConfiguration using a + * Windows image reference). For Linux compute nodes, the certificates are + * stored in a directory inside the task working directory and an + * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task + * to query for this location. For certificates with visibility of + * 'remoteUser', a 'certs' directory is created in the user's home + * directory (e.g., /home/{user-name}/certs) and certificates are placed in + * that directory. Possible values include: 'CurrentUser', 'LocalMachine'. + */ + @JsonProperty(value = "storeLocation") + private CertificateStoreLocation storeLocation; + + /** + * The name of the certificate store on the compute node into which to + * install the certificate. + * This property is applicable only for pools configured with Windows nodes + * (that is, created with cloudServiceConfiguration, or with + * virtualMachineConfiguration using a Windows image reference). Common + * store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, + * TrustedPublisher, AuthRoot, AddressBook, but any custom store name can + * also be used. The default value is My. + */ + @JsonProperty(value = "storeName") + private String storeName; + + /** + * Which user accounts on the compute node should have access to the + * private data of the certificate. + * Values are: + * + * starttask - The user account under which the start task is run. + * task - The accounts under which job tasks are run. + * remoteuser - The accounts under which users remotely access the node. + * + * You can specify more than one visibility in this collection. The default + * is all accounts. + */ + @JsonProperty(value = "visibility") + private List visibility; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the CertificateReference object itself. + */ + public CertificateReference withId(String id) { + this.id = id; + return this; + } + + /** + * Get the default value is currentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: 'CurrentUser', 'LocalMachine'. + * + * @return the storeLocation value + */ + public CertificateStoreLocation storeLocation() { + return this.storeLocation; + } + + /** + * Set the default value is currentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: 'CurrentUser', 'LocalMachine'. + * + * @param storeLocation the storeLocation value to set + * @return the CertificateReference object itself. + */ + public CertificateReference withStoreLocation(CertificateStoreLocation storeLocation) { + this.storeLocation = storeLocation; + return this; + } + + /** + * Get this property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My. + * + * @return the storeName value + */ + public String storeName() { + return this.storeName; + } + + /** + * Set this property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My. + * + * @param storeName the storeName value to set + * @return the CertificateReference object itself. + */ + public CertificateReference withStoreName(String storeName) { + this.storeName = storeName; + return this; + } + + /** + * Get values are: + starttask - The user account under which the start task is run. + task - The accounts under which job tasks are run. + remoteuser - The accounts under which users remotely access the node. + You can specify more than one visibility in this collection. The default is all accounts. + * + * @return the visibility value + */ + public List visibility() { + return this.visibility; + } + + /** + * Set values are: + starttask - The user account under which the start task is run. + task - The accounts under which job tasks are run. + remoteuser - The accounts under which users remotely access the node. + You can specify more than one visibility in this collection. The default is all accounts. + * + * @param visibility the visibility value to set + * @return the CertificateReference object itself. + */ + public CertificateReference withVisibility(List visibility) { + this.visibility = visibility; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateStoreLocation.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateStoreLocation.java new file mode 100644 index 000000000000..1aec929b15f5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateStoreLocation.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateStoreLocation. + */ +public enum CertificateStoreLocation { + /** Enum value CurrentUser. */ + CURRENT_USER("CurrentUser"), + + /** Enum value LocalMachine. */ + LOCAL_MACHINE("LocalMachine"); + + /** The actual serialized value for a CertificateStoreLocation instance. */ + private String value; + + CertificateStoreLocation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateStoreLocation instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateStoreLocation object, or null if unable to parse. + */ + @JsonCreator + public static CertificateStoreLocation fromString(String value) { + CertificateStoreLocation[] items = CertificateStoreLocation.values(); + for (CertificateStoreLocation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateUpdateHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateUpdateHeaders.java new file mode 100644 index 000000000000..21350eeee2ff --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateUpdateHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Update operation. + */ +public class CertificateUpdateHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the CertificateUpdateHeaders object itself. + */ + public CertificateUpdateHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateVisibility.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateVisibility.java new file mode 100644 index 000000000000..687ed3f2e57e --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CertificateVisibility.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CertificateVisibility. + */ +public enum CertificateVisibility { + /** Enum value StartTask. */ + START_TASK("StartTask"), + + /** Enum value Task. */ + TASK("Task"), + + /** Enum value RemoteUser. */ + REMOTE_USER("RemoteUser"); + + /** The actual serialized value for a CertificateVisibility instance. */ + private String value; + + CertificateVisibility(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateVisibility instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateVisibility object, or null if unable to parse. + */ + @JsonCreator + public static CertificateVisibility fromString(String value) { + CertificateVisibility[] items = CertificateVisibility.values(); + for (CertificateVisibility item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificates.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificates.java new file mode 100644 index 000000000000..41f0079465de --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Certificates.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.CertificatesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Certificates. + */ +public interface Certificates extends SupportsCreating, HasInner { + /** + * Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelDeletionAsync(String resourceGroupName, String accountName, String certificateName); + + /** + * Gets information about the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String certificateName); + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByBatchAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String certificateName); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityParameters.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityParameters.java new file mode 100644 index 000000000000..177d855cd233 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityParameters.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for a check name availability request. + */ +public class CheckNameAvailabilityParameters { + /** + * The name to check for availability. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The resource type. Must be set to Microsoft.Batch/batchAccounts. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of CheckNameAvailabilityParameters class. + * @param name the name to check for availability. + */ + public CheckNameAvailabilityParameters() { + type = "Microsoft.Batch/batchAccounts"; + } + + /** + * Get the name to check for availability. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name to check for availability. + * + * @param name the name value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. Must be set to Microsoft.Batch/batchAccounts. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type. Must be set to Microsoft.Batch/batchAccounts. + * + * @param type the type value to set + * @return the CheckNameAvailabilityParameters object itself. + */ + public CheckNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityResult.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityResult.java new file mode 100644 index 000000000000..b34c2dba6ddf --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CheckNameAvailabilityResult.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.CheckNameAvailabilityResultInner; + +/** + * Type representing CheckNameAvailabilityResult. + */ +public interface CheckNameAvailabilityResult extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + NameAvailabilityReason reason(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CloudServiceConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CloudServiceConfiguration.java new file mode 100644 index 000000000000..ff6e65661376 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/CloudServiceConfiguration.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration for nodes in a pool based on the Azure Cloud Services + * platform. + */ +public class CloudServiceConfiguration { + /** + * The Azure Guest OS family to be installed on the virtual machines in the + * pool. + * Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 + * R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS + * Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, + * equivalent to Windows Server 2016. For more information, see Azure Guest + * OS Releases + * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). + */ + @JsonProperty(value = "osFamily", required = true) + private String osFamily; + + /** + * The Azure Guest OS version to be installed on the virtual machines in + * the pool. + * The default value is * which specifies the latest operating system + * version for the specified OS family. + */ + @JsonProperty(value = "targetOSVersion") + private String targetOSVersion; + + /** + * The Azure Guest OS Version currently installed on the virtual machines + * in the pool. + * This may differ from targetOSVersion if the pool state is Upgrading. In + * this case some virtual machines may be on the targetOSVersion and some + * may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the + * same as targetOSVersion. + */ + @JsonProperty(value = "currentOSVersion") + private String currentOSVersion; + + /** + * Get possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). + * + * @return the osFamily value + */ + public String osFamily() { + return this.osFamily; + } + + /** + * Set possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). + * + * @param osFamily the osFamily value to set + * @return the CloudServiceConfiguration object itself. + */ + public CloudServiceConfiguration withOsFamily(String osFamily) { + this.osFamily = osFamily; + return this; + } + + /** + * Get the default value is * which specifies the latest operating system version for the specified OS family. + * + * @return the targetOSVersion value + */ + public String targetOSVersion() { + return this.targetOSVersion; + } + + /** + * Set the default value is * which specifies the latest operating system version for the specified OS family. + * + * @param targetOSVersion the targetOSVersion value to set + * @return the CloudServiceConfiguration object itself. + */ + public CloudServiceConfiguration withTargetOSVersion(String targetOSVersion) { + this.targetOSVersion = targetOSVersion; + return this; + } + + /** + * Get this may differ from targetOSVersion if the pool state is Upgrading. In this case some virtual machines may be on the targetOSVersion and some may be on the currentOSVersion during the upgrade process. Once all virtual machines have upgraded, currentOSVersion is updated to be the same as targetOSVersion. + * + * @return the currentOSVersion value + */ + public String currentOSVersion() { + return this.currentOSVersion; + } + + /** + * Set this may differ from targetOSVersion if the pool state is Upgrading. In this case some virtual machines may be on the targetOSVersion and some may be on the currentOSVersion during the upgrade process. Once all virtual machines have upgraded, currentOSVersion is updated to be the same as targetOSVersion. + * + * @param currentOSVersion the currentOSVersion value to set + * @return the CloudServiceConfiguration object itself. + */ + public CloudServiceConfiguration withCurrentOSVersion(String currentOSVersion) { + this.currentOSVersion = currentOSVersion; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeDeallocationOption.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeDeallocationOption.java new file mode 100644 index 000000000000..73efefa524bd --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeDeallocationOption.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ComputeNodeDeallocationOption. + */ +public enum ComputeNodeDeallocationOption { + /** Enum value Requeue. */ + REQUEUE("Requeue"), + + /** Enum value Terminate. */ + TERMINATE("Terminate"), + + /** Enum value TaskCompletion. */ + TASK_COMPLETION("TaskCompletion"), + + /** Enum value RetainedData. */ + RETAINED_DATA("RetainedData"); + + /** The actual serialized value for a ComputeNodeDeallocationOption instance. */ + private String value; + + ComputeNodeDeallocationOption(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ComputeNodeDeallocationOption instance. + * + * @param value the serialized value to parse. + * @return the parsed ComputeNodeDeallocationOption object, or null if unable to parse. + */ + @JsonCreator + public static ComputeNodeDeallocationOption fromString(String value) { + ComputeNodeDeallocationOption[] items = ComputeNodeDeallocationOption.values(); + for (ComputeNodeDeallocationOption item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeFillType.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeFillType.java new file mode 100644 index 000000000000..8675bfa6c44e --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ComputeNodeFillType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ComputeNodeFillType. + */ +public enum ComputeNodeFillType { + /** Enum value Spread. */ + SPREAD("Spread"), + + /** Enum value Pack. */ + PACK("Pack"); + + /** The actual serialized value for a ComputeNodeFillType instance. */ + private String value; + + ComputeNodeFillType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ComputeNodeFillType instance. + * + * @param value the serialized value to parse. + * @return the parsed ComputeNodeFillType object, or null if unable to parse. + */ + @JsonCreator + public static ComputeNodeFillType fromString(String value) { + ComputeNodeFillType[] items = ComputeNodeFillType.values(); + for (ComputeNodeFillType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DataDisk.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DataDisk.java new file mode 100644 index 000000000000..179d16e300fa --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DataDisk.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Disk settings which will be used by the data disks associated to + * Compute Nodes in the pool. + */ +public class DataDisk { + /** + * The logical unit number. + * The lun is used to uniquely identify each data disk. If attaching + * multiple disks, each should have a distinct lun. + */ + @JsonProperty(value = "lun", required = true) + private int lun; + + /** + * The type of caching to be enabled for the data disks. + * Values are: + * + * none - The caching mode for the disk is not enabled. + * readOnly - The caching mode for the disk is read only. + * readWrite - The caching mode for the disk is read and write. + * + * The default value for caching is none. For information about the caching + * options see: + * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + */ + @JsonProperty(value = "caching") + private CachingType caching; + + /** + * The initial disk size in GB when creating new data disk. + */ + @JsonProperty(value = "diskSizeGB", required = true) + private int diskSizeGB; + + /** + * The storage account type to be used for the data disk. + * If omitted, the default is "Standard_LRS". Values are: + * + * Standard_LRS - The data disk should use standard locally redundant + * storage. + * Premium_LRS - The data disk should use premium locally redundant + * storage. Possible values include: 'Standard_LRS', 'Premium_LRS'. + */ + @JsonProperty(value = "storageAccountType") + private StorageAccountType storageAccountType; + + /** + * Get the lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. + * + * @return the lun value + */ + public int lun() { + return this.lun; + } + + /** + * Set the lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. + * + * @param lun the lun value to set + * @return the DataDisk object itself. + */ + public DataDisk withLun(int lun) { + this.lun = lun; + return this; + } + + /** + * Get values are: + none - The caching mode for the disk is not enabled. + readOnly - The caching mode for the disk is read only. + readWrite - The caching mode for the disk is read and write. + The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + * + * @return the caching value + */ + public CachingType caching() { + return this.caching; + } + + /** + * Set values are: + none - The caching mode for the disk is not enabled. + readOnly - The caching mode for the disk is read only. + readWrite - The caching mode for the disk is read and write. + The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + * + * @param caching the caching value to set + * @return the DataDisk object itself. + */ + public DataDisk withCaching(CachingType caching) { + this.caching = caching; + return this; + } + + /** + * Get the diskSizeGB value. + * + * @return the diskSizeGB value + */ + public int diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set the diskSizeGB value. + * + * @param diskSizeGB the diskSizeGB value to set + * @return the DataDisk object itself. + */ + public DataDisk withDiskSizeGB(int diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get if omitted, the default is "Standard_LRS". Values are: + Standard_LRS - The data disk should use standard locally redundant storage. + Premium_LRS - The data disk should use premium locally redundant storage. Possible values include: 'Standard_LRS', 'Premium_LRS'. + * + * @return the storageAccountType value + */ + public StorageAccountType storageAccountType() { + return this.storageAccountType; + } + + /** + * Set if omitted, the default is "Standard_LRS". Values are: + Standard_LRS - The data disk should use standard locally redundant storage. + Premium_LRS - The data disk should use premium locally redundant storage. Possible values include: 'Standard_LRS', 'Premium_LRS'. + * + * @param storageAccountType the storageAccountType value to set + * @return the DataDisk object itself. + */ + public DataDisk withStorageAccountType(StorageAccountType storageAccountType) { + this.storageAccountType = storageAccountType; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeleteCertificateError.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeleteCertificateError.java new file mode 100644 index 000000000000..40f2147699f4 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeleteCertificateError.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the Batch service. + */ +public class DeleteCertificateError { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * The target of the particular error. For example, the name of the + * property in error. + */ + @JsonProperty(value = "target") + private String target; + + /** + * A list of additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the DeleteCertificateError object itself. + */ + public DeleteCertificateError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the DeleteCertificateError object itself. + */ + public DeleteCertificateError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target of the particular error. For example, the name of the property in error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target of the particular error. For example, the name of the property in error. + * + * @param target the target value to set + * @return the DeleteCertificateError object itself. + */ + public DeleteCertificateError withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get a list of additional details about the error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set a list of additional details about the error. + * + * @param details the details value to set + * @return the DeleteCertificateError object itself. + */ + public DeleteCertificateError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeploymentConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeploymentConfiguration.java new file mode 100644 index 000000000000..d3b64030e424 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/DeploymentConfiguration.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment configuration properties. + */ +public class DeploymentConfiguration { + /** + * The cloud service configuration for the pool. + * This property and virtualMachineConfiguration are mutually exclusive and + * one of the properties must be specified. This property cannot be + * specified if the Batch account was created with its poolAllocationMode + * property set to 'UserSubscription'. + */ + @JsonProperty(value = "cloudServiceConfiguration") + private CloudServiceConfiguration cloudServiceConfiguration; + + /** + * The virtual machine configuration for the pool. + * This property and cloudServiceConfiguration are mutually exclusive and + * one of the properties must be specified. + */ + @JsonProperty(value = "virtualMachineConfiguration") + private VirtualMachineConfiguration virtualMachineConfiguration; + + /** + * Get this property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'. + * + * @return the cloudServiceConfiguration value + */ + public CloudServiceConfiguration cloudServiceConfiguration() { + return this.cloudServiceConfiguration; + } + + /** + * Set this property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'. + * + * @param cloudServiceConfiguration the cloudServiceConfiguration value to set + * @return the DeploymentConfiguration object itself. + */ + public DeploymentConfiguration withCloudServiceConfiguration(CloudServiceConfiguration cloudServiceConfiguration) { + this.cloudServiceConfiguration = cloudServiceConfiguration; + return this; + } + + /** + * Get this property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. + * + * @return the virtualMachineConfiguration value + */ + public VirtualMachineConfiguration virtualMachineConfiguration() { + return this.virtualMachineConfiguration; + } + + /** + * Set this property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. + * + * @param virtualMachineConfiguration the virtualMachineConfiguration value to set + * @return the DeploymentConfiguration object itself. + */ + public DeploymentConfiguration withVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration) { + this.virtualMachineConfiguration = virtualMachineConfiguration; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ElevationLevel.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ElevationLevel.java new file mode 100644 index 000000000000..e5feb3670428 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ElevationLevel.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ElevationLevel. + */ +public enum ElevationLevel { + /** Enum value NonAdmin. */ + NON_ADMIN("NonAdmin"), + + /** Enum value Admin. */ + ADMIN("Admin"); + + /** The actual serialized value for a ElevationLevel instance. */ + private String value; + + ElevationLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ElevationLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed ElevationLevel object, or null if unable to parse. + */ + @JsonCreator + public static ElevationLevel fromString(String value) { + ElevationLevel[] items = ElevationLevel.values(); + for (ElevationLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/EnvironmentSetting.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/EnvironmentSetting.java new file mode 100644 index 000000000000..3b202c80e99a --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/EnvironmentSetting.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An environment variable to be set on a task process. + */ +public class EnvironmentSetting { + /** + * The name of the environment variable. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The value of the environment variable. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the EnvironmentSetting object itself. + */ + public EnvironmentSetting withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the EnvironmentSetting object itself. + */ + public EnvironmentSetting withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/FixedScaleSettings.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/FixedScaleSettings.java new file mode 100644 index 000000000000..f1b8ee4b98aa --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/FixedScaleSettings.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Fixed scale settings for the pool. + */ +public class FixedScaleSettings { + /** + * The timeout for allocation of compute nodes to the pool. + * The default value is 15 minutes. Timeout values use ISO 8601 format. For + * example, use PT10M for 10 minutes. The minimum value is 5 minutes. If + * you specify a value less than 5 minutes, the Batch service rejects the + * request with an error; if you are calling the REST API directly, the + * HTTP status code is 400 (Bad Request). + */ + @JsonProperty(value = "resizeTimeout") + private Period resizeTimeout; + + /** + * The desired number of dedicated compute nodes in the pool. + * At least one of targetDedicatedNodes, targetLowPriority nodes must be + * set. + */ + @JsonProperty(value = "targetDedicatedNodes") + private Integer targetDedicatedNodes; + + /** + * The desired number of low-priority compute nodes in the pool. + * At least one of targetDedicatedNodes, targetLowPriority nodes must be + * set. + */ + @JsonProperty(value = "targetLowPriorityNodes") + private Integer targetLowPriorityNodes; + + /** + * Determines what to do with a node and its running task(s) if the pool + * size is decreasing. + * If omitted, the default value is Requeue. Possible values include: + * 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'. + */ + @JsonProperty(value = "nodeDeallocationOption") + private ComputeNodeDeallocationOption nodeDeallocationOption; + + /** + * Get the default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + * + * @return the resizeTimeout value + */ + public Period resizeTimeout() { + return this.resizeTimeout; + } + + /** + * Set the default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + * + * @param resizeTimeout the resizeTimeout value to set + * @return the FixedScaleSettings object itself. + */ + public FixedScaleSettings withResizeTimeout(Period resizeTimeout) { + this.resizeTimeout = resizeTimeout; + return this; + } + + /** + * Get at least one of targetDedicatedNodes, targetLowPriority nodes must be set. + * + * @return the targetDedicatedNodes value + */ + public Integer targetDedicatedNodes() { + return this.targetDedicatedNodes; + } + + /** + * Set at least one of targetDedicatedNodes, targetLowPriority nodes must be set. + * + * @param targetDedicatedNodes the targetDedicatedNodes value to set + * @return the FixedScaleSettings object itself. + */ + public FixedScaleSettings withTargetDedicatedNodes(Integer targetDedicatedNodes) { + this.targetDedicatedNodes = targetDedicatedNodes; + return this; + } + + /** + * Get at least one of targetDedicatedNodes, targetLowPriority nodes must be set. + * + * @return the targetLowPriorityNodes value + */ + public Integer targetLowPriorityNodes() { + return this.targetLowPriorityNodes; + } + + /** + * Set at least one of targetDedicatedNodes, targetLowPriority nodes must be set. + * + * @param targetLowPriorityNodes the targetLowPriorityNodes value to set + * @return the FixedScaleSettings object itself. + */ + public FixedScaleSettings withTargetLowPriorityNodes(Integer targetLowPriorityNodes) { + this.targetLowPriorityNodes = targetLowPriorityNodes; + return this; + } + + /** + * Get if omitted, the default value is Requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'. + * + * @return the nodeDeallocationOption value + */ + public ComputeNodeDeallocationOption nodeDeallocationOption() { + return this.nodeDeallocationOption; + } + + /** + * Set if omitted, the default value is Requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'. + * + * @param nodeDeallocationOption the nodeDeallocationOption value to set + * @return the FixedScaleSettings object itself. + */ + public FixedScaleSettings withNodeDeallocationOption(ComputeNodeDeallocationOption nodeDeallocationOption) { + this.nodeDeallocationOption = nodeDeallocationOption; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ImageReference.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ImageReference.java new file mode 100644 index 000000000000..85c6e4aca1f6 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ImageReference.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A reference to an Azure Virtual Machines Marketplace image or the Azure + * Image resource of a custom Virtual Machine. To get the list of all + * imageReferences verified by Azure Batch, see the 'List supported node agent + * SKUs' operation. + */ +public class ImageReference { + /** + * The publisher of the Azure Virtual Machines Marketplace image. + * For example, Canonical or MicrosoftWindowsServer. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * The offer type of the Azure Virtual Machines Marketplace image. + * For example, UbuntuServer or WindowsServer. + */ + @JsonProperty(value = "offer") + private String offer; + + /** + * The SKU of the Azure Virtual Machines Marketplace image. + * For example, 14.04.0-LTS or 2012-R2-Datacenter. + */ + @JsonProperty(value = "sku") + private String sku; + + /** + * The version of the Azure Virtual Machines Marketplace image. + * A value of 'latest' can be specified to select the latest version of an + * image. If omitted, the default is 'latest'. + */ + @JsonProperty(value = "version") + private String version; + + /** + * The ARM resource identifier of the virtual machine image. Computes nodes + * of the pool will be created using this custom image. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. + * This property is mutually exclusive with other properties. The virtual + * machine image must be in the same region and subscription as the Azure + * Batch account. For information about the firewall settings for Batch + * node agent to communicate with Batch service see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration + * . + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get for example, Canonical or MicrosoftWindowsServer. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set for example, Canonical or MicrosoftWindowsServer. + * + * @param publisher the publisher value to set + * @return the ImageReference object itself. + */ + public ImageReference withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get for example, UbuntuServer or WindowsServer. + * + * @return the offer value + */ + public String offer() { + return this.offer; + } + + /** + * Set for example, UbuntuServer or WindowsServer. + * + * @param offer the offer value to set + * @return the ImageReference object itself. + */ + public ImageReference withOffer(String offer) { + this.offer = offer; + return this; + } + + /** + * Get for example, 14.04.0-LTS or 2012-R2-Datacenter. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set for example, 14.04.0-LTS or 2012-R2-Datacenter. + * + * @param sku the sku value to set + * @return the ImageReference object itself. + */ + public ImageReference withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get a value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set a value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. + * + * @param version the version value to set + * @return the ImageReference object itself. + */ + public ImageReference withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get this property is mutually exclusive with other properties. The virtual machine image must be in the same region and subscription as the Azure Batch account. For information about the firewall settings for Batch node agent to communicate with Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration . + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set this property is mutually exclusive with other properties. The virtual machine image must be in the same region and subscription as the Azure Batch account. For information about the firewall settings for Batch node agent to communicate with Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration . + * + * @param id the id value to set + * @return the ImageReference object itself. + */ + public ImageReference withId(String id) { + this.id = id; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundEndpointProtocol.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundEndpointProtocol.java new file mode 100644 index 000000000000..1837ec7ffe0b --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundEndpointProtocol.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for InboundEndpointProtocol. + */ +public enum InboundEndpointProtocol { + /** Enum value TCP. */ + TCP("TCP"), + + /** Enum value UDP. */ + UDP("UDP"); + + /** The actual serialized value for a InboundEndpointProtocol instance. */ + private String value; + + InboundEndpointProtocol(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a InboundEndpointProtocol instance. + * + * @param value the serialized value to parse. + * @return the parsed InboundEndpointProtocol object, or null if unable to parse. + */ + @JsonCreator + public static InboundEndpointProtocol fromString(String value) { + InboundEndpointProtocol[] items = InboundEndpointProtocol.values(); + for (InboundEndpointProtocol item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundNatPool.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundNatPool.java new file mode 100644 index 000000000000..bca8061cd50f --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InboundNatPool.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A inbound NAT pool that can be used to address specific ports on compute + * nodes in a Batch pool externally. + */ +public class InboundNatPool { + /** + * The name of the endpoint. + * The name must be unique within a Batch pool, can contain letters, + * numbers, underscores, periods, and hyphens. Names must start with a + * letter or number, must end with a letter, number, or underscore, and + * cannot exceed 77 characters. If any invalid values are provided the + * request fails with HTTP status code 400. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The protocol of the endpoint. + * Possible values include: 'TCP', 'UDP'. + */ + @JsonProperty(value = "protocol", required = true) + private InboundEndpointProtocol protocol; + + /** + * The port number on the compute node. + * This must be unique within a Batch pool. Acceptable values are between 1 + * and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If + * any reserved values are provided the request fails with HTTP status code + * 400. + */ + @JsonProperty(value = "backendPort", required = true) + private int backendPort; + + /** + * The first port number in the range of external ports that will be used + * to provide inbound access to the backendPort on individual compute + * nodes. + * Acceptable values range between 1 and 65534 except ports from 50000 to + * 55000 which are reserved. All ranges within a pool must be distinct and + * cannot overlap. If any reserved or overlapping values are provided the + * request fails with HTTP status code 400. + */ + @JsonProperty(value = "frontendPortRangeStart", required = true) + private int frontendPortRangeStart; + + /** + * The last port number in the range of external ports that will be used to + * provide inbound access to the backendPort on individual compute nodes. + * Acceptable values range between 1 and 65534 except ports from 50000 to + * 55000 which are reserved by the Batch service. All ranges within a pool + * must be distinct and cannot overlap. If any reserved or overlapping + * values are provided the request fails with HTTP status code 400. + */ + @JsonProperty(value = "frontendPortRangeEnd", required = true) + private int frontendPortRangeEnd; + + /** + * A list of network security group rules that will be applied to the + * endpoint. + * The maximum number of rules that can be specified across all the + * endpoints on a Batch pool is 25. If no network security group rules are + * specified, a default rule will be created to allow inbound access to the + * specified backendPort. If the maximum number of network security group + * rules is exceeded the request fails with HTTP status code 400. + */ + @JsonProperty(value = "networkSecurityGroupRules") + private List networkSecurityGroupRules; + + /** + * Get the name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + * + * @param name the name value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withName(String name) { + this.name = name; + return this; + } + + /** + * Get possible values include: 'TCP', 'UDP'. + * + * @return the protocol value + */ + public InboundEndpointProtocol protocol() { + return this.protocol; + } + + /** + * Set possible values include: 'TCP', 'UDP'. + * + * @param protocol the protocol value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withProtocol(InboundEndpointProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get this must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + * + * @return the backendPort value + */ + public int backendPort() { + return this.backendPort; + } + + /** + * Set this must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + * + * @param backendPort the backendPort value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withBackendPort(int backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + * + * @return the frontendPortRangeStart value + */ + public int frontendPortRangeStart() { + return this.frontendPortRangeStart; + } + + /** + * Set acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + * + * @param frontendPortRangeStart the frontendPortRangeStart value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withFrontendPortRangeStart(int frontendPortRangeStart) { + this.frontendPortRangeStart = frontendPortRangeStart; + return this; + } + + /** + * Get acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + * + * @return the frontendPortRangeEnd value + */ + public int frontendPortRangeEnd() { + return this.frontendPortRangeEnd; + } + + /** + * Set acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + * + * @param frontendPortRangeEnd the frontendPortRangeEnd value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withFrontendPortRangeEnd(int frontendPortRangeEnd) { + this.frontendPortRangeEnd = frontendPortRangeEnd; + return this; + } + + /** + * Get the maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. + * + * @return the networkSecurityGroupRules value + */ + public List networkSecurityGroupRules() { + return this.networkSecurityGroupRules; + } + + /** + * Set the maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. + * + * @param networkSecurityGroupRules the networkSecurityGroupRules value to set + * @return the InboundNatPool object itself. + */ + public InboundNatPool withNetworkSecurityGroupRules(List networkSecurityGroupRules) { + this.networkSecurityGroupRules = networkSecurityGroupRules; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InterNodeCommunicationState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InterNodeCommunicationState.java new file mode 100644 index 000000000000..a76a24defb53 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/InterNodeCommunicationState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for InterNodeCommunicationState. + */ +public enum InterNodeCommunicationState { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a InterNodeCommunicationState instance. */ + private String value; + + InterNodeCommunicationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a InterNodeCommunicationState instance. + * + * @param value the serialized value to parse. + * @return the parsed InterNodeCommunicationState object, or null if unable to parse. + */ + @JsonCreator + public static InterNodeCommunicationState fromString(String value) { + InterNodeCommunicationState[] items = InterNodeCommunicationState.values(); + for (InterNodeCommunicationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/KeyVaultReference.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/KeyVaultReference.java new file mode 100644 index 000000000000..087c2c632442 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/KeyVaultReference.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identifies the Azure key vault associated with a Batch account. + */ +public class KeyVaultReference { + /** + * The resource ID of the Azure key vault associated with the Batch + * account. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The URL of the Azure key vault associated with the Batch account. + */ + @JsonProperty(value = "url", required = true) + private String url; + + /** + * Get the resource ID of the Azure key vault associated with the Batch account. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource ID of the Azure key vault associated with the Batch account. + * + * @param id the id value to set + * @return the KeyVaultReference object itself. + */ + public KeyVaultReference withId(String id) { + this.id = id; + return this; + } + + /** + * Get the URL of the Azure key vault associated with the Batch account. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the URL of the Azure key vault associated with the Batch account. + * + * @param url the url value to set + * @return the KeyVaultReference object itself. + */ + public KeyVaultReference withUrl(String url) { + this.url = url; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/LinuxUserConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/LinuxUserConfiguration.java new file mode 100644 index 000000000000..b10e156a0944 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/LinuxUserConfiguration.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties used to create a user account on a Linux node. + */ +public class LinuxUserConfiguration { + /** + * The user ID of the user account. + * The uid and gid properties must be specified together or not at all. If + * not specified the underlying operating system picks the uid. + */ + @JsonProperty(value = "uid") + private Integer uid; + + /** + * The group ID for the user account. + * The uid and gid properties must be specified together or not at all. If + * not specified the underlying operating system picks the gid. + */ + @JsonProperty(value = "gid") + private Integer gid; + + /** + * The SSH private key for the user account. + * The private key must not be password protected. The private key is used + * to automatically configure asymmetric-key based authentication for SSH + * between nodes in a Linux pool when the pool's + * enableInterNodeCommunication property is true (it is ignored if + * enableInterNodeCommunication is false). It does this by placing the key + * pair into the user's .ssh directory. If not specified, password-less SSH + * is not configured between nodes (no modification of the user's .ssh + * directory is done). + */ + @JsonProperty(value = "sshPrivateKey") + private String sshPrivateKey; + + /** + * Get the uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. + * + * @return the uid value + */ + public Integer uid() { + return this.uid; + } + + /** + * Set the uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. + * + * @param uid the uid value to set + * @return the LinuxUserConfiguration object itself. + */ + public LinuxUserConfiguration withUid(Integer uid) { + this.uid = uid; + return this; + } + + /** + * Get the uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. + * + * @return the gid value + */ + public Integer gid() { + return this.gid; + } + + /** + * Set the uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. + * + * @param gid the gid value to set + * @return the LinuxUserConfiguration object itself. + */ + public LinuxUserConfiguration withGid(Integer gid) { + this.gid = gid; + return this; + } + + /** + * Get the private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done). + * + * @return the sshPrivateKey value + */ + public String sshPrivateKey() { + return this.sshPrivateKey; + } + + /** + * Set the private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done). + * + * @param sshPrivateKey the sshPrivateKey value to set + * @return the LinuxUserConfiguration object itself. + */ + public LinuxUserConfiguration withSshPrivateKey(String sshPrivateKey) { + this.sshPrivateKey = sshPrivateKey; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Locations.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Locations.java new file mode 100644 index 000000000000..a1d10f0b9163 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Locations.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import rx.Observable; + +/** + * Type representing Locations. + */ +public interface Locations { + /** + * Gets the Batch service quotas for the specified subscription at the given location. + * + * @param locationName The region for which to retrieve Batch service quotas. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getQuotasAsync(String locationName); + + /** + * Checks whether the Batch account name is available in the specified region. + * + * @param locationName The desired region for the name check. + * @param name The name to check for availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String locationName, String name); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/MetadataItem.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/MetadataItem.java new file mode 100644 index 000000000000..b7c4484cf3f5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/MetadataItem.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A name-value pair associated with a Batch service resource. + * The Batch service does not assign any meaning to this metadata; it is solely + * for the use of user code. + */ +public class MetadataItem { + /** + * The name of the metadata item. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The value of the metadata item. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the MetadataItem object itself. + */ + public MetadataItem withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the MetadataItem object itself. + */ + public MetadataItem withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NameAvailabilityReason.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NameAvailabilityReason.java new file mode 100644 index 000000000000..84cd5ebe3e33 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NameAvailabilityReason.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for NameAvailabilityReason. + */ +public enum NameAvailabilityReason { + /** Enum value Invalid. */ + INVALID("Invalid"), + + /** Enum value AlreadyExists. */ + ALREADY_EXISTS("AlreadyExists"); + + /** The actual serialized value for a NameAvailabilityReason instance. */ + private String value; + + NameAvailabilityReason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NameAvailabilityReason instance. + * + * @param value the serialized value to parse. + * @return the parsed NameAvailabilityReason object, or null if unable to parse. + */ + @JsonCreator + public static NameAvailabilityReason fromString(String value) { + NameAvailabilityReason[] items = NameAvailabilityReason.values(); + for (NameAvailabilityReason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkConfiguration.java new file mode 100644 index 000000000000..5e7475a4bdaf --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkConfiguration.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The network configuration for a pool. + */ +public class NetworkConfiguration { + /** + * The ARM resource identifier of the virtual network subnet which the + * compute nodes of the pool will join. This is of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * The virtual network must be in the same region and subscription as the + * Azure Batch account. The specified subnet should have enough free IP + * addresses to accommodate the number of nodes in the pool. If the subnet + * doesn't have enough free IP addresses, the pool will partially allocate + * compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' + * service principal must have the 'Classic Virtual Machine Contributor' + * Role-Based Access Control (RBAC) role for the specified VNet. The + * specified subnet must allow communication from the Azure Batch service + * to be able to schedule tasks on the compute nodes. This can be verified + * by checking if the specified VNet has any associated Network Security + * Groups (NSG). If communication to the compute nodes in the specified + * subnet is denied by an NSG, then the Batch service will set the state of + * the compute nodes to unusable. For pools created via + * virtualMachineConfiguration the Batch account must have + * poolAllocationMode userSubscription in order to use a VNet. If the + * specified VNet has any associated Network Security Groups (NSG), then a + * few reserved system ports must be enabled for inbound communication. For + * pools created with a virtual machine configuration, enable ports 29876 + * and 29877, as well as port 22 for Linux and port 3389 for Windows. For + * pools created with a cloud service configuration, enable ports 10100, + * 20100, and 30100. Also enable outbound connections to Azure Storage on + * port 443. For more details see: + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + */ + @JsonProperty(value = "subnetId") + private String subnetId; + + /** + * The configuration for endpoints on compute nodes in the Batch pool. + * Pool endpoint configuration is only supported on pools with the + * virtualMachineConfiguration property. + */ + @JsonProperty(value = "endpointConfiguration") + private PoolEndpointConfiguration endpointConfiguration; + + /** + * Get the virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. For pools created via virtualMachineConfiguration the Batch account must have poolAllocationMode userSubscription in order to use a VNet. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. For pools created via virtualMachineConfiguration the Batch account must have poolAllocationMode userSubscription in order to use a VNet. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * + * @param subnetId the subnetId value to set + * @return the NetworkConfiguration object itself. + */ + public NetworkConfiguration withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property. + * + * @return the endpointConfiguration value + */ + public PoolEndpointConfiguration endpointConfiguration() { + return this.endpointConfiguration; + } + + /** + * Set pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property. + * + * @param endpointConfiguration the endpointConfiguration value to set + * @return the NetworkConfiguration object itself. + */ + public NetworkConfiguration withEndpointConfiguration(PoolEndpointConfiguration endpointConfiguration) { + this.endpointConfiguration = endpointConfiguration; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRule.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRule.java new file mode 100644 index 000000000000..de75d63fb9c5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRule.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A network security group rule to apply to an inbound endpoint. + */ +public class NetworkSecurityGroupRule { + /** + * The priority for this rule. + * Priorities within a pool must be unique and are evaluated in order of + * priority. The lower the number the higher the priority. For example, + * rules could be specified with order numbers of 150, 250, and 350. The + * rule with the order number of 150 takes precedence over the rule that + * has an order of 250. Allowed priorities are 150 to 3500. If any reserved + * or duplicate values are provided the request fails with HTTP status code + * 400. + */ + @JsonProperty(value = "priority", required = true) + private int priority; + + /** + * The action that should be taken for a specified IP address, subnet range + * or tag. + * Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "access", required = true) + private NetworkSecurityGroupRuleAccess access; + + /** + * The source address prefix or tag to match for the rule. + * Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. + * 192.168.1.0/24), default tag, or * (for all addresses). If any other + * values are provided the request fails with HTTP status code 400. + */ + @JsonProperty(value = "sourceAddressPrefix", required = true) + private String sourceAddressPrefix; + + /** + * Get priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400. + * + * @return the priority value + */ + public int priority() { + return this.priority; + } + + /** + * Set priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400. + * + * @param priority the priority value to set + * @return the NetworkSecurityGroupRule object itself. + */ + public NetworkSecurityGroupRule withPriority(int priority) { + this.priority = priority; + return this; + } + + /** + * Get possible values include: 'Allow', 'Deny'. + * + * @return the access value + */ + public NetworkSecurityGroupRuleAccess access() { + return this.access; + } + + /** + * Set possible values include: 'Allow', 'Deny'. + * + * @param access the access value to set + * @return the NetworkSecurityGroupRule object itself. + */ + public NetworkSecurityGroupRule withAccess(NetworkSecurityGroupRuleAccess access) { + this.access = access; + return this; + } + + /** + * Get valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. + * + * @return the sourceAddressPrefix value + */ + public String sourceAddressPrefix() { + return this.sourceAddressPrefix; + } + + /** + * Set valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. + * + * @param sourceAddressPrefix the sourceAddressPrefix value to set + * @return the NetworkSecurityGroupRule object itself. + */ + public NetworkSecurityGroupRule withSourceAddressPrefix(String sourceAddressPrefix) { + this.sourceAddressPrefix = sourceAddressPrefix; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRuleAccess.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRuleAccess.java new file mode 100644 index 000000000000..1a8ac59255f8 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/NetworkSecurityGroupRuleAccess.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for NetworkSecurityGroupRuleAccess. + */ +public enum NetworkSecurityGroupRuleAccess { + /** Enum value Allow. */ + ALLOW("Allow"), + + /** Enum value Deny. */ + DENY("Deny"); + + /** The actual serialized value for a NetworkSecurityGroupRuleAccess instance. */ + private String value; + + NetworkSecurityGroupRuleAccess(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NetworkSecurityGroupRuleAccess instance. + * + * @param value the serialized value to parse. + * @return the parsed NetworkSecurityGroupRuleAccess object, or null if unable to parse. + */ + @JsonCreator + public static NetworkSecurityGroupRuleAccess fromString(String value) { + NetworkSecurityGroupRuleAccess[] items = NetworkSecurityGroupRuleAccess.values(); + for (NetworkSecurityGroupRuleAccess item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OSDisk.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OSDisk.java new file mode 100644 index 000000000000..13842dadae80 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OSDisk.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for the operating system disk of the virtual machine. + */ +public class OSDisk { + /** + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the + * disk is read only. readWrite - The caching mode for the disk is read and + * write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite'. + */ + @JsonProperty(value = "caching") + private CachingType caching; + + /** + * Get default value is none. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + * + * @return the caching value + */ + public CachingType caching() { + return this.caching; + } + + /** + * Set default value is none. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + * + * @param caching the caching value to set + * @return the OSDisk object itself. + */ + public OSDisk withCaching(CachingType caching) { + this.caching = caching; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operation.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operation.java new file mode 100644 index 000000000000..07c4513d01ae --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operation.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OperationDisplay.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OperationDisplay.java new file mode 100644 index 000000000000..7fb7823f60b1 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/OperationDisplay.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object that describes the operation. + */ +public class OperationDisplay { + /** + * Friendly name of the resource provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The operation type. + * For example: read, write, delete, or listKeys/action. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The resource type on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The friendly name of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider value. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider value. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get for example: read, write, delete, or listKeys/action. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set for example: read, write, delete, or listKeys/action. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the resource value. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource value. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operations.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operations.java new file mode 100644 index 000000000000..26a95e86f8ca --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PackageState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PackageState.java new file mode 100644 index 000000000000..e2406f983416 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PackageState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PackageState. + */ +public enum PackageState { + /** Enum value Pending. */ + PENDING("Pending"), + + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Unmapped. */ + UNMAPPED("Unmapped"); + + /** The actual serialized value for a PackageState instance. */ + private String value; + + PackageState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PackageState instance. + * + * @param value the serialized value to parse. + * @return the parsed PackageState object, or null if unable to parse. + */ + @JsonCreator + public static PackageState fromString(String value) { + PackageState[] items = PackageState.values(); + for (PackageState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pool.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pool.java new file mode 100644 index 000000000000..6731a4dccc55 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pool.java @@ -0,0 +1,587 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.PoolInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.BatchManager; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Pool. + */ +public interface Pool extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the allocationState value. + */ + AllocationState allocationState(); + + /** + * @return the allocationStateTransitionTime value. + */ + DateTime allocationStateTransitionTime(); + + /** + * @return the applicationLicenses value. + */ + List applicationLicenses(); + + /** + * @return the applicationPackages value. + */ + List applicationPackages(); + + /** + * @return the autoScaleRun value. + */ + AutoScaleRun autoScaleRun(); + + /** + * @return the certificates value. + */ + List certificates(); + + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the currentDedicatedNodes value. + */ + Integer currentDedicatedNodes(); + + /** + * @return the currentLowPriorityNodes value. + */ + Integer currentLowPriorityNodes(); + + /** + * @return the deploymentConfiguration value. + */ + DeploymentConfiguration deploymentConfiguration(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the interNodeCommunication value. + */ + InterNodeCommunicationState interNodeCommunication(); + + /** + * @return the lastModified value. + */ + DateTime lastModified(); + + /** + * @return the maxTasksPerNode value. + */ + Integer maxTasksPerNode(); + + /** + * @return the metadata value. + */ + List metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the networkConfiguration value. + */ + NetworkConfiguration networkConfiguration(); + + /** + * @return the provisioningState value. + */ + PoolProvisioningState provisioningState(); + + /** + * @return the provisioningStateTransitionTime value. + */ + DateTime provisioningStateTransitionTime(); + + /** + * @return the resizeOperationStatus value. + */ + ResizeOperationStatus resizeOperationStatus(); + + /** + * @return the scaleSettings value. + */ + ScaleSettings scaleSettings(); + + /** + * @return the startTask value. + */ + StartTask startTask(); + + /** + * @return the taskSchedulingPolicy value. + */ + TaskSchedulingPolicy taskSchedulingPolicy(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the userAccounts value. + */ + List userAccounts(); + + /** + * @return the vmSize value. + */ + String vmSize(); + + /** + * The entirety of the Pool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithBatchAccount, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch, DefinitionStages.WithCreate { + } + + /** + * Grouping of Pool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Pool definition. + */ + interface Blank extends WithBatchAccount { + } + + /** + * The stage of the pool definition allowing to specify BatchAccount. + */ + interface WithBatchAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group that contains the Batch account + * @param accountName The name of the Batch account + * @return the next definition stage + */ + WithIfMatch withExistingBatchAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the pool definition allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied + * @return the next definition stage + */ + WithIfNoneMatch withIfMatch(String ifMatch); + } + + /** + * The stage of the pool definition allowing to specify IfNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies ifNoneMatch. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored + * @return the next definition stage + */ + WithCreate withIfNoneMatch(String ifNoneMatch); + } + + /** + * The stage of the pool definition allowing to specify ApplicationLicenses. + */ + interface WithApplicationLicenses { + /** + * Specifies applicationLicenses. + * @param applicationLicenses The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail + * @return the next definition stage + */ + WithCreate withApplicationLicenses(List applicationLicenses); + } + + /** + * The stage of the pool definition allowing to specify ApplicationPackages. + */ + interface WithApplicationPackages { + /** + * Specifies applicationPackages. + * @param applicationPackages Changes to application packages affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged + * @return the next definition stage + */ + WithCreate withApplicationPackages(List applicationPackages); + } + + /** + * The stage of the pool definition allowing to specify Certificates. + */ + interface WithCertificates { + /** + * Specifies certificates. + * @param certificates For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory + * @return the next definition stage + */ + WithCreate withCertificates(List certificates); + } + + /** + * The stage of the pool definition allowing to specify DeploymentConfiguration. + */ + interface WithDeploymentConfiguration { + /** + * Specifies deploymentConfiguration. + * @param deploymentConfiguration Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS) + * @return the next definition stage + */ + WithCreate withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); + } + + /** + * The stage of the pool definition allowing to specify DisplayName. + */ + interface WithDisplayName { + /** + * Specifies displayName. + * @param displayName The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024 + * @return the next definition stage + */ + WithCreate withDisplayName(String displayName); + } + + /** + * The stage of the pool definition allowing to specify InterNodeCommunication. + */ + interface WithInterNodeCommunication { + /** + * Specifies interNodeCommunication. + * @param interNodeCommunication This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication); + } + + /** + * The stage of the pool definition allowing to specify MaxTasksPerNode. + */ + interface WithMaxTasksPerNode { + /** + * Specifies maxTasksPerNode. + * @param maxTasksPerNode the maxTasksPerNode parameter value + * @return the next definition stage + */ + WithCreate withMaxTasksPerNode(Integer maxTasksPerNode); + } + + /** + * The stage of the pool definition allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata The Batch service does not assign any meaning to metadata; it is solely for the use of user code + * @return the next definition stage + */ + WithCreate withMetadata(List metadata); + } + + /** + * The stage of the pool definition allowing to specify NetworkConfiguration. + */ + interface WithNetworkConfiguration { + /** + * Specifies networkConfiguration. + * @param networkConfiguration the networkConfiguration parameter value + * @return the next definition stage + */ + WithCreate withNetworkConfiguration(NetworkConfiguration networkConfiguration); + } + + /** + * The stage of the pool definition allowing to specify ScaleSettings. + */ + interface WithScaleSettings { + /** + * Specifies scaleSettings. + * @param scaleSettings the scaleSettings parameter value + * @return the next definition stage + */ + WithCreate withScaleSettings(ScaleSettings scaleSettings); + } + + /** + * The stage of the pool definition allowing to specify StartTask. + */ + interface WithStartTask { + /** + * Specifies startTask. + * @param startTask In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool + * @return the next definition stage + */ + WithCreate withStartTask(StartTask startTask); + } + + /** + * The stage of the pool definition allowing to specify TaskSchedulingPolicy. + */ + interface WithTaskSchedulingPolicy { + /** + * Specifies taskSchedulingPolicy. + * @param taskSchedulingPolicy the taskSchedulingPolicy parameter value + * @return the next definition stage + */ + WithCreate withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy); + } + + /** + * The stage of the pool definition allowing to specify UserAccounts. + */ + interface WithUserAccounts { + /** + * Specifies userAccounts. + * @param userAccounts the userAccounts parameter value + * @return the next definition stage + */ + WithCreate withUserAccounts(List userAccounts); + } + + /** + * The stage of the pool definition allowing to specify VmSize. + */ + interface WithVmSize { + /** + * Specifies vmSize. + * @param vmSize For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series) + * @return the next definition stage + */ + WithCreate withVmSize(String vmSize); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithApplicationLicenses, DefinitionStages.WithApplicationPackages, DefinitionStages.WithCertificates, DefinitionStages.WithDeploymentConfiguration, DefinitionStages.WithDisplayName, DefinitionStages.WithInterNodeCommunication, DefinitionStages.WithMaxTasksPerNode, DefinitionStages.WithMetadata, DefinitionStages.WithNetworkConfiguration, DefinitionStages.WithScaleSettings, DefinitionStages.WithStartTask, DefinitionStages.WithTaskSchedulingPolicy, DefinitionStages.WithUserAccounts, DefinitionStages.WithVmSize { + } + } + /** + * The template for a Pool update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithApplicationLicenses, UpdateStages.WithApplicationPackages, UpdateStages.WithCertificates, UpdateStages.WithDeploymentConfiguration, UpdateStages.WithDisplayName, UpdateStages.WithInterNodeCommunication, UpdateStages.WithMaxTasksPerNode, UpdateStages.WithMetadata, UpdateStages.WithNetworkConfiguration, UpdateStages.WithScaleSettings, UpdateStages.WithStartTask, UpdateStages.WithTaskSchedulingPolicy, UpdateStages.WithUserAccounts, UpdateStages.WithVmSize { + } + + /** + * Grouping of Pool update stages. + */ + interface UpdateStages { + /** + * The stage of the pool update allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally + * @return the next update stage + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the pool update allowing to specify ApplicationLicenses. + */ + interface WithApplicationLicenses { + /** + * Specifies applicationLicenses. + * @param applicationLicenses The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail + * @return the next update stage + */ + Update withApplicationLicenses(List applicationLicenses); + } + + /** + * The stage of the pool update allowing to specify ApplicationPackages. + */ + interface WithApplicationPackages { + /** + * Specifies applicationPackages. + * @param applicationPackages Changes to application packages affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged + * @return the next update stage + */ + Update withApplicationPackages(List applicationPackages); + } + + /** + * The stage of the pool update allowing to specify Certificates. + */ + interface WithCertificates { + /** + * Specifies certificates. + * @param certificates For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory + * @return the next update stage + */ + Update withCertificates(List certificates); + } + + /** + * The stage of the pool update allowing to specify DeploymentConfiguration. + */ + interface WithDeploymentConfiguration { + /** + * Specifies deploymentConfiguration. + * @param deploymentConfiguration Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS) + * @return the next update stage + */ + Update withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); + } + + /** + * The stage of the pool update allowing to specify DisplayName. + */ + interface WithDisplayName { + /** + * Specifies displayName. + * @param displayName The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024 + * @return the next update stage + */ + Update withDisplayName(String displayName); + } + + /** + * The stage of the pool update allowing to specify InterNodeCommunication. + */ + interface WithInterNodeCommunication { + /** + * Specifies interNodeCommunication. + * @param interNodeCommunication This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. Possible values include: 'Enabled', 'Disabled' + * @return the next update stage + */ + Update withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication); + } + + /** + * The stage of the pool update allowing to specify MaxTasksPerNode. + */ + interface WithMaxTasksPerNode { + /** + * Specifies maxTasksPerNode. + * @param maxTasksPerNode the maxTasksPerNode parameter value + * @return the next update stage + */ + Update withMaxTasksPerNode(Integer maxTasksPerNode); + } + + /** + * The stage of the pool update allowing to specify Metadata. + */ + interface WithMetadata { + /** + * Specifies metadata. + * @param metadata The Batch service does not assign any meaning to metadata; it is solely for the use of user code + * @return the next update stage + */ + Update withMetadata(List metadata); + } + + /** + * The stage of the pool update allowing to specify NetworkConfiguration. + */ + interface WithNetworkConfiguration { + /** + * Specifies networkConfiguration. + * @param networkConfiguration the networkConfiguration parameter value + * @return the next update stage + */ + Update withNetworkConfiguration(NetworkConfiguration networkConfiguration); + } + + /** + * The stage of the pool update allowing to specify ScaleSettings. + */ + interface WithScaleSettings { + /** + * Specifies scaleSettings. + * @param scaleSettings the scaleSettings parameter value + * @return the next update stage + */ + Update withScaleSettings(ScaleSettings scaleSettings); + } + + /** + * The stage of the pool update allowing to specify StartTask. + */ + interface WithStartTask { + /** + * Specifies startTask. + * @param startTask In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool + * @return the next update stage + */ + Update withStartTask(StartTask startTask); + } + + /** + * The stage of the pool update allowing to specify TaskSchedulingPolicy. + */ + interface WithTaskSchedulingPolicy { + /** + * Specifies taskSchedulingPolicy. + * @param taskSchedulingPolicy the taskSchedulingPolicy parameter value + * @return the next update stage + */ + Update withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy); + } + + /** + * The stage of the pool update allowing to specify UserAccounts. + */ + interface WithUserAccounts { + /** + * Specifies userAccounts. + * @param userAccounts the userAccounts parameter value + * @return the next update stage + */ + Update withUserAccounts(List userAccounts); + } + + /** + * The stage of the pool update allowing to specify VmSize. + */ + interface WithVmSize { + /** + * Specifies vmSize. + * @param vmSize For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series) + * @return the next update stage + */ + Update withVmSize(String vmSize); + } + + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolAllocationMode.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolAllocationMode.java new file mode 100644 index 000000000000..66724a3e2b04 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolAllocationMode.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PoolAllocationMode. + */ +public enum PoolAllocationMode { + /** Enum value BatchService. */ + BATCH_SERVICE("BatchService"), + + /** Enum value UserSubscription. */ + USER_SUBSCRIPTION("UserSubscription"); + + /** The actual serialized value for a PoolAllocationMode instance. */ + private String value; + + PoolAllocationMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PoolAllocationMode instance. + * + * @param value the serialized value to parse. + * @return the parsed PoolAllocationMode object, or null if unable to parse. + */ + @JsonCreator + public static PoolAllocationMode fromString(String value) { + PoolAllocationMode[] items = PoolAllocationMode.values(); + for (PoolAllocationMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolCreateHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolCreateHeaders.java new file mode 100644 index 000000000000..01af95609580 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolCreateHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Create operation. + */ +public class PoolCreateHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the PoolCreateHeaders object itself. + */ + public PoolCreateHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDeleteHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDeleteHeaders.java new file mode 100644 index 000000000000..c3911fd2410f --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDeleteHeaders.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Delete operation. + */ +public class PoolDeleteHeaders { + /** + * The URL of the resource used to check the status of the asynchronous + * operation. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Suggested delay to check the status of the asynchronous operation. The + * value is an integer that represents the seconds. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /** + * Get the URL of the resource used to check the status of the asynchronous operation. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the URL of the resource used to check the status of the asynchronous operation. + * + * @param location the location value to set + * @return the PoolDeleteHeaders object itself. + */ + public PoolDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. + * + * @return the retryAfter value + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. + * + * @param retryAfter the retryAfter value to set + * @return the PoolDeleteHeaders object itself. + */ + public PoolDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDisableAutoScaleHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDisableAutoScaleHeaders.java new file mode 100644 index 000000000000..48da980f41b8 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolDisableAutoScaleHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for DisableAutoScale operation. + */ +public class PoolDisableAutoScaleHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the PoolDisableAutoScaleHeaders object itself. + */ + public PoolDisableAutoScaleHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolEndpointConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolEndpointConfiguration.java new file mode 100644 index 000000000000..456c88054ec4 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolEndpointConfiguration.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The endpoint configuration for a pool. + */ +public class PoolEndpointConfiguration { + /** + * A list of inbound NAT pools that can be used to address specific ports + * on an individual compute node externally. + * The maximum number of inbound NAT pools per Batch pool is 5. If the + * maximum number of inbound NAT pools is exceeded the request fails with + * HTTP status code 400. + */ + @JsonProperty(value = "inboundNatPools", required = true) + private List inboundNatPools; + + /** + * Get the maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400. + * + * @return the inboundNatPools value + */ + public List inboundNatPools() { + return this.inboundNatPools; + } + + /** + * Set the maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400. + * + * @param inboundNatPools the inboundNatPools value to set + * @return the PoolEndpointConfiguration object itself. + */ + public PoolEndpointConfiguration withInboundNatPools(List inboundNatPools) { + this.inboundNatPools = inboundNatPools; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolGetHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolGetHeaders.java new file mode 100644 index 000000000000..41f3ca2a4a01 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolGetHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Get operation. + */ +public class PoolGetHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the PoolGetHeaders object itself. + */ + public PoolGetHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolProvisioningState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolProvisioningState.java new file mode 100644 index 000000000000..348de7f2e0cb --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolProvisioningState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PoolProvisioningState. + */ +public enum PoolProvisioningState { + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Deleting. */ + DELETING("Deleting"); + + /** The actual serialized value for a PoolProvisioningState instance. */ + private String value; + + PoolProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PoolProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed PoolProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static PoolProvisioningState fromString(String value) { + PoolProvisioningState[] items = PoolProvisioningState.values(); + for (PoolProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolStopResizeHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolStopResizeHeaders.java new file mode 100644 index 000000000000..112fe2f9da01 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolStopResizeHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for StopResize operation. + */ +public class PoolStopResizeHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the PoolStopResizeHeaders object itself. + */ + public PoolStopResizeHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolUpdateHeaders.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolUpdateHeaders.java new file mode 100644 index 000000000000..93337b10b978 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/PoolUpdateHeaders.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for Update operation. + */ +public class PoolUpdateHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the PoolUpdateHeaders object itself. + */ + public PoolUpdateHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pools.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pools.java new file mode 100644 index 000000000000..04a47763fe87 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/Pools.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.implementation.PoolsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Pools. + */ +public interface Pools extends SupportsCreating, HasInner { + /** + * Disables automatic scaling for a pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable disableAutoScaleAsync(String resourceGroupName, String accountName, String poolName); + + /** + * Stops an ongoing resize operation on the pool. + * This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable stopResizeAsync(String resourceGroupName, String accountName, String poolName); + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName, String poolName); + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByBatchAccountAsync(final String resourceGroupName, final String accountName); + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName, String poolName); + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ProvisioningState.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ProvisioningState.java new file mode 100644 index 000000000000..4c6128212cb2 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ProvisioningState.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProvisioningState. + */ +public enum ProvisioningState { + /** Enum value Invalid. */ + INVALID("Invalid"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"); + + /** The actual serialized value for a ProvisioningState instance. */ + private String value; + + ProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningState fromString(String value) { + ProvisioningState[] items = ProvisioningState.values(); + for (ProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeError.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeError.java new file mode 100644 index 000000000000..c0679146ad03 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeError.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error that occurred when resizing a pool. + */ +public class ResizeError { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * Additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the ResizeError object itself. + */ + public ResizeError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the ResizeError object itself. + */ + public ResizeError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the ResizeError object itself. + */ + public ResizeError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeOperationStatus.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeOperationStatus.java new file mode 100644 index 000000000000..46d09cdd7825 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResizeOperationStatus.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import org.joda.time.Period; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details about the current or last completed resize operation. + * Describes either the current operation (if the pool AllocationState is + * Resizing) or the previously completed operation (if the AllocationState is + * Steady). + */ +public class ResizeOperationStatus { + /** + * The desired number of dedicated compute nodes in the pool. + */ + @JsonProperty(value = "targetDedicatedNodes") + private Integer targetDedicatedNodes; + + /** + * The desired number of low-priority compute nodes in the pool. + */ + @JsonProperty(value = "targetLowPriorityNodes") + private Integer targetLowPriorityNodes; + + /** + * The timeout for allocation of compute nodes to the pool or removal of + * compute nodes from the pool. + * The default value is 15 minutes. The minimum value is 5 minutes. If you + * specify a value less than 5 minutes, the Batch service returns an error; + * if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). + */ + @JsonProperty(value = "resizeTimeout") + private Period resizeTimeout; + + /** + * Determines what to do with a node and its running task(s) if the pool + * size is decreasing. + * The default value is requeue. Possible values include: 'Requeue', + * 'Terminate', 'TaskCompletion', 'RetainedData'. + */ + @JsonProperty(value = "nodeDeallocationOption") + private ComputeNodeDeallocationOption nodeDeallocationOption; + + /** + * The time when this resize operation was started. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * Details of any errors encountered while performing the last resize on + * the pool. + * This property is set only if an error occurred during the last pool + * resize, and only when the pool allocationState is Steady. + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * Get the targetDedicatedNodes value. + * + * @return the targetDedicatedNodes value + */ + public Integer targetDedicatedNodes() { + return this.targetDedicatedNodes; + } + + /** + * Set the targetDedicatedNodes value. + * + * @param targetDedicatedNodes the targetDedicatedNodes value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withTargetDedicatedNodes(Integer targetDedicatedNodes) { + this.targetDedicatedNodes = targetDedicatedNodes; + return this; + } + + /** + * Get the targetLowPriorityNodes value. + * + * @return the targetLowPriorityNodes value + */ + public Integer targetLowPriorityNodes() { + return this.targetLowPriorityNodes; + } + + /** + * Set the targetLowPriorityNodes value. + * + * @param targetLowPriorityNodes the targetLowPriorityNodes value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withTargetLowPriorityNodes(Integer targetLowPriorityNodes) { + this.targetLowPriorityNodes = targetLowPriorityNodes; + return this; + } + + /** + * Get the default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + * + * @return the resizeTimeout value + */ + public Period resizeTimeout() { + return this.resizeTimeout; + } + + /** + * Set the default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + * + * @param resizeTimeout the resizeTimeout value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withResizeTimeout(Period resizeTimeout) { + this.resizeTimeout = resizeTimeout; + return this; + } + + /** + * Get the default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'. + * + * @return the nodeDeallocationOption value + */ + public ComputeNodeDeallocationOption nodeDeallocationOption() { + return this.nodeDeallocationOption; + } + + /** + * Set the default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData'. + * + * @param nodeDeallocationOption the nodeDeallocationOption value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withNodeDeallocationOption(ComputeNodeDeallocationOption nodeDeallocationOption) { + this.nodeDeallocationOption = nodeDeallocationOption; + return this; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get this property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set this property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady. + * + * @param errors the errors value to set + * @return the ResizeOperationStatus object itself. + */ + public ResizeOperationStatus withErrors(List errors) { + this.errors = errors; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResourceFile.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResourceFile.java new file mode 100644 index 000000000000..7802ae680b78 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ResourceFile.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A file to be downloaded from Azure blob storage to a compute node. + */ +public class ResourceFile { + /** + * The URL of the file within Azure Blob Storage. + * This URL must be readable using anonymous access; that is, the Batch + * service does not present any credentials when downloading the blob. + * There are two ways to get such a URL for a blob in Azure storage: + * include a Shared Access Signature (SAS) granting read permissions on the + * blob, or set the ACL for the blob or its container to allow public + * access. + */ + @JsonProperty(value = "blobSource", required = true) + private String blobSource; + + /** + * The location on the compute node to which to download the file, relative + * to the task's working directory. + */ + @JsonProperty(value = "filePath", required = true) + private String filePath; + + /** + * The file permission mode attribute in octal format. + * This property applies only to files being downloaded to Linux compute + * nodes. It will be ignored if it is specified for a resourceFile which + * will be downloaded to a Windows node. If this property is not specified + * for a Linux node, then a default value of 0770 is applied to the file. + */ + @JsonProperty(value = "fileMode") + private String fileMode; + + /** + * Get this URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access. + * + * @return the blobSource value + */ + public String blobSource() { + return this.blobSource; + } + + /** + * Set this URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access. + * + * @param blobSource the blobSource value to set + * @return the ResourceFile object itself. + */ + public ResourceFile withBlobSource(String blobSource) { + this.blobSource = blobSource; + return this; + } + + /** + * Get the filePath value. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath value. + * + * @param filePath the filePath value to set + * @return the ResourceFile object itself. + */ + public ResourceFile withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get this property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file. + * + * @return the fileMode value + */ + public String fileMode() { + return this.fileMode; + } + + /** + * Set this property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file. + * + * @param fileMode the fileMode value to set + * @return the ResourceFile object itself. + */ + public ResourceFile withFileMode(String fileMode) { + this.fileMode = fileMode; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ScaleSettings.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ScaleSettings.java new file mode 100644 index 000000000000..171df4f23f75 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/ScaleSettings.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Scale settings for the pool. + * Defines the desired size of the pool. This can either be 'fixedScale' where + * the requested targetDedicatedNodes is specified, or 'autoScale' which + * defines a formula which is periodically reevaluated. If this property is not + * specified, the pool will have a fixed scale with 0 targetDedicatedNodes. + */ +public class ScaleSettings { + /** + * Fixed scale settings for the pool. + * This property and autoScale are mutually exclusive and one of the + * properties must be specified. + */ + @JsonProperty(value = "fixedScale") + private FixedScaleSettings fixedScale; + + /** + * AutoScale settings for the pool. + * This property and fixedScale are mutually exclusive and one of the + * properties must be specified. + */ + @JsonProperty(value = "autoScale") + private AutoScaleSettings autoScale; + + /** + * Get this property and autoScale are mutually exclusive and one of the properties must be specified. + * + * @return the fixedScale value + */ + public FixedScaleSettings fixedScale() { + return this.fixedScale; + } + + /** + * Set this property and autoScale are mutually exclusive and one of the properties must be specified. + * + * @param fixedScale the fixedScale value to set + * @return the ScaleSettings object itself. + */ + public ScaleSettings withFixedScale(FixedScaleSettings fixedScale) { + this.fixedScale = fixedScale; + return this; + } + + /** + * Get this property and fixedScale are mutually exclusive and one of the properties must be specified. + * + * @return the autoScale value + */ + public AutoScaleSettings autoScale() { + return this.autoScale; + } + + /** + * Set this property and fixedScale are mutually exclusive and one of the properties must be specified. + * + * @param autoScale the autoScale value to set + * @return the ScaleSettings object itself. + */ + public ScaleSettings withAutoScale(AutoScaleSettings autoScale) { + this.autoScale = autoScale; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StartTask.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StartTask.java new file mode 100644 index 000000000000..d84ab38f610d --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StartTask.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A task which is run when a compute node joins a pool in the Azure Batch + * service, or when the compute node is rebooted or reimaged. + */ +public class StartTask { + /** + * The command line of the start task. + * The command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If + * you want to take advantage of such features, you should invoke the shell + * in the command line, for example using "cmd /c MyCommand" in Windows or + * "/bin/sh -c MyCommand" in Linux. Required if any other properties of the + * startTask are specified. + */ + @JsonProperty(value = "commandLine") + private String commandLine; + + /** + * A list of files that the Batch service will download to the compute node + * before running the command line. + */ + @JsonProperty(value = "resourceFiles") + private List resourceFiles; + + /** + * A list of environment variable settings for the start task. + */ + @JsonProperty(value = "environmentSettings") + private List environmentSettings; + + /** + * The user identity under which the start task runs. + * If omitted, the task runs as a non-administrative user unique to the + * task. + */ + @JsonProperty(value = "userIdentity") + private UserIdentity userIdentity; + + /** + * The maximum number of times the task may be retried. + * The Batch service retries a task if its exit code is nonzero. Note that + * this value specifically controls the number of retries. The Batch + * service will try the task once, and may then retry up to this limit. For + * example, if the maximum retry count is 3, Batch tries the task up to 4 + * times (one initial try and 3 retries). If the maximum retry count is 0, + * the Batch service does not retry the task. If the maximum retry count is + * -1, the Batch service retries the task without limit. + */ + @JsonProperty(value = "maxTaskRetryCount") + private Integer maxTaskRetryCount; + + /** + * Whether the Batch service should wait for the start task to complete + * successfully (that is, to exit with exit code 0) before scheduling any + * tasks on the compute node. + * If true and the start task fails on a compute node, the Batch service + * retries the start task up to its maximum retry count + * (maxTaskRetryCount). If the task has still not completed successfully + * after all retries, then the Batch service marks the compute node + * unusable, and will not schedule tasks to it. This condition can be + * detected via the node state and scheduling error detail. If false, the + * Batch service will not wait for the start task to complete. In this + * case, other tasks can start executing on the compute node while the + * start task is still running; and even if the start task fails, new tasks + * will continue to be scheduled on the node. The default is false. + */ + @JsonProperty(value = "waitForSuccess") + private Boolean waitForSuccess; + + /** + * Get the command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if any other properties of the startTask are specified. + * + * @return the commandLine value + */ + public String commandLine() { + return this.commandLine; + } + + /** + * Set the command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if any other properties of the startTask are specified. + * + * @param commandLine the commandLine value to set + * @return the StartTask object itself. + */ + public StartTask withCommandLine(String commandLine) { + this.commandLine = commandLine; + return this; + } + + /** + * Get the resourceFiles value. + * + * @return the resourceFiles value + */ + public List resourceFiles() { + return this.resourceFiles; + } + + /** + * Set the resourceFiles value. + * + * @param resourceFiles the resourceFiles value to set + * @return the StartTask object itself. + */ + public StartTask withResourceFiles(List resourceFiles) { + this.resourceFiles = resourceFiles; + return this; + } + + /** + * Get the environmentSettings value. + * + * @return the environmentSettings value + */ + public List environmentSettings() { + return this.environmentSettings; + } + + /** + * Set the environmentSettings value. + * + * @param environmentSettings the environmentSettings value to set + * @return the StartTask object itself. + */ + public StartTask withEnvironmentSettings(List environmentSettings) { + this.environmentSettings = environmentSettings; + return this; + } + + /** + * Get if omitted, the task runs as a non-administrative user unique to the task. + * + * @return the userIdentity value + */ + public UserIdentity userIdentity() { + return this.userIdentity; + } + + /** + * Set if omitted, the task runs as a non-administrative user unique to the task. + * + * @param userIdentity the userIdentity value to set + * @return the StartTask object itself. + */ + public StartTask withUserIdentity(UserIdentity userIdentity) { + this.userIdentity = userIdentity; + return this; + } + + /** + * Get the Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. + * + * @return the maxTaskRetryCount value + */ + public Integer maxTaskRetryCount() { + return this.maxTaskRetryCount; + } + + /** + * Set the Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. + * + * @param maxTaskRetryCount the maxTaskRetryCount value to set + * @return the StartTask object itself. + */ + public StartTask withMaxTaskRetryCount(Integer maxTaskRetryCount) { + this.maxTaskRetryCount = maxTaskRetryCount; + return this; + } + + /** + * Get if true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false. + * + * @return the waitForSuccess value + */ + public Boolean waitForSuccess() { + return this.waitForSuccess; + } + + /** + * Set if true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false. + * + * @param waitForSuccess the waitForSuccess value to set + * @return the StartTask object itself. + */ + public StartTask withWaitForSuccess(Boolean waitForSuccess) { + this.waitForSuccess = waitForSuccess; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StorageAccountType.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StorageAccountType.java new file mode 100644 index 000000000000..833dee6260d4 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/StorageAccountType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StorageAccountType. + */ +public enum StorageAccountType { + /** Enum value Standard_LRS. */ + STANDARD_LRS("Standard_LRS"), + + /** Enum value Premium_LRS. */ + PREMIUM_LRS("Premium_LRS"); + + /** The actual serialized value for a StorageAccountType instance. */ + private String value; + + StorageAccountType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StorageAccountType instance. + * + * @param value the serialized value to parse. + * @return the parsed StorageAccountType object, or null if unable to parse. + */ + @JsonCreator + public static StorageAccountType fromString(String value) { + StorageAccountType[] items = StorageAccountType.values(); + for (StorageAccountType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/TaskSchedulingPolicy.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/TaskSchedulingPolicy.java new file mode 100644 index 000000000000..0d8279ab3c06 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/TaskSchedulingPolicy.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies how tasks should be distributed across compute nodes. + */ +public class TaskSchedulingPolicy { + /** + * How tasks should be distributed across compute nodes. + * Possible values include: 'Spread', 'Pack'. + */ + @JsonProperty(value = "nodeFillType", required = true) + private ComputeNodeFillType nodeFillType; + + /** + * Get possible values include: 'Spread', 'Pack'. + * + * @return the nodeFillType value + */ + public ComputeNodeFillType nodeFillType() { + return this.nodeFillType; + } + + /** + * Set possible values include: 'Spread', 'Pack'. + * + * @param nodeFillType the nodeFillType value to set + * @return the TaskSchedulingPolicy object itself. + */ + public TaskSchedulingPolicy withNodeFillType(ComputeNodeFillType nodeFillType) { + this.nodeFillType = nodeFillType; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserAccount.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserAccount.java new file mode 100644 index 000000000000..3d123dd45947 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserAccount.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties used to create a user on an Azure Batch node. + */ +public class UserAccount { + /** + * The name of the user account. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The password for the user account. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * The elevation level of the user account. + * nonAdmin - The auto user is a standard user without elevated access. + * admin - The auto user is a user with elevated access and operates with + * full Administrator permissions. The default value is nonAdmin. Possible + * values include: 'NonAdmin', 'Admin'. + */ + @JsonProperty(value = "elevationLevel") + private ElevationLevel elevationLevel; + + /** + * The Linux-specific user configuration for the user account. + * This property is ignored if specified on a Windows pool. If not + * specified, the user is created with the default options. + */ + @JsonProperty(value = "linuxUserConfiguration") + private LinuxUserConfiguration linuxUserConfiguration; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the UserAccount object itself. + */ + public UserAccount withName(String name) { + this.name = name; + return this; + } + + /** + * Get the password value. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password value. + * + * @param password the password value to set + * @return the UserAccount object itself. + */ + public UserAccount withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'. + * + * @return the elevationLevel value + */ + public ElevationLevel elevationLevel() { + return this.elevationLevel; + } + + /** + * Set nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin'. + * + * @param elevationLevel the elevationLevel value to set + * @return the UserAccount object itself. + */ + public UserAccount withElevationLevel(ElevationLevel elevationLevel) { + this.elevationLevel = elevationLevel; + return this; + } + + /** + * Get this property is ignored if specified on a Windows pool. If not specified, the user is created with the default options. + * + * @return the linuxUserConfiguration value + */ + public LinuxUserConfiguration linuxUserConfiguration() { + return this.linuxUserConfiguration; + } + + /** + * Set this property is ignored if specified on a Windows pool. If not specified, the user is created with the default options. + * + * @param linuxUserConfiguration the linuxUserConfiguration value to set + * @return the UserAccount object itself. + */ + public UserAccount withLinuxUserConfiguration(LinuxUserConfiguration linuxUserConfiguration) { + this.linuxUserConfiguration = linuxUserConfiguration; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserIdentity.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserIdentity.java new file mode 100644 index 000000000000..f17e19a40272 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/UserIdentity.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The definition of the user identity under which the task is run. + * Specify either the userName or autoUser property, but not both. + */ +public class UserIdentity { + /** + * The name of the user identity under which the task is run. + * The userName and autoUser properties are mutually exclusive; you must + * specify one but not both. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * The auto user under which the task is run. + * The userName and autoUser properties are mutually exclusive; you must + * specify one but not both. + */ + @JsonProperty(value = "autoUser") + private AutoUserSpecification autoUser; + + /** + * Get the userName and autoUser properties are mutually exclusive; you must specify one but not both. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName and autoUser properties are mutually exclusive; you must specify one but not both. + * + * @param userName the userName value to set + * @return the UserIdentity object itself. + */ + public UserIdentity withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the userName and autoUser properties are mutually exclusive; you must specify one but not both. + * + * @return the autoUser value + */ + public AutoUserSpecification autoUser() { + return this.autoUser; + } + + /** + * Set the userName and autoUser properties are mutually exclusive; you must specify one but not both. + * + * @param autoUser the autoUser value to set + * @return the UserIdentity object itself. + */ + public UserIdentity withAutoUser(AutoUserSpecification autoUser) { + this.autoUser = autoUser; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/VirtualMachineConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/VirtualMachineConfiguration.java new file mode 100644 index 000000000000..0b0aabb0aac5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/VirtualMachineConfiguration.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration for compute nodes in a pool based on the Azure Virtual + * Machines infrastructure. + */ +public class VirtualMachineConfiguration { + /** + * A reference to the Azure Virtual Machines Marketplace Image or the + * custom Virtual Machine Image to use. + */ + @JsonProperty(value = "imageReference", required = true) + private ImageReference imageReference; + + /** + * Settings for the operating system disk of the Virtual Machine. + */ + @JsonProperty(value = "osDisk") + private OSDisk osDisk; + + /** + * The SKU of the Batch node agent to be provisioned on compute nodes in + * the pool. + * The Batch node agent is a program that runs on each node in the pool, + * and provides the command-and-control interface between the node and the + * Batch service. There are different implementations of the node agent, + * known as SKUs, for different operating systems. You must specify a node + * agent SKU which matches the selected image reference. To get the list of + * supported node agent SKUs along with their list of verified image + * references, see the 'List supported node agent SKUs' operation. + */ + @JsonProperty(value = "nodeAgentSkuId", required = true) + private String nodeAgentSkuId; + + /** + * Windows operating system settings on the virtual machine. + * This property must not be specified if the imageReference specifies a + * Linux OS image. + */ + @JsonProperty(value = "windowsConfiguration") + private WindowsConfiguration windowsConfiguration; + + /** + * The configuration for data disks attached to the compute nodes in the + * pool. + * This property must be specified if the compute nodes in the pool need to + * have empty data disks attached to them. + */ + @JsonProperty(value = "dataDisks") + private List dataDisks; + + /** + * The type of on-premises license to be used when deploying the operating + * system. + * This only applies to images that contain the Windows operating system, + * and should only be used when you hold valid on-premises licenses for the + * nodes which will be deployed. If omitted, no on-premises licensing + * discount is applied. Values are: + * + * Windows_Server - The on-premises license is for Windows Server. + * Windows_Client - The on-premises license is for Windows Client. + */ + @JsonProperty(value = "licenseType") + private String licenseType; + + /** + * Get the imageReference value. + * + * @return the imageReference value + */ + public ImageReference imageReference() { + return this.imageReference; + } + + /** + * Set the imageReference value. + * + * @param imageReference the imageReference value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withImageReference(ImageReference imageReference) { + this.imageReference = imageReference; + return this; + } + + /** + * Get the osDisk value. + * + * @return the osDisk value + */ + public OSDisk osDisk() { + return this.osDisk; + } + + /** + * Set the osDisk value. + * + * @param osDisk the osDisk value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withOsDisk(OSDisk osDisk) { + this.osDisk = osDisk; + return this; + } + + /** + * Get the Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation. + * + * @return the nodeAgentSkuId value + */ + public String nodeAgentSkuId() { + return this.nodeAgentSkuId; + } + + /** + * Set the Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation. + * + * @param nodeAgentSkuId the nodeAgentSkuId value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withNodeAgentSkuId(String nodeAgentSkuId) { + this.nodeAgentSkuId = nodeAgentSkuId; + return this; + } + + /** + * Get this property must not be specified if the imageReference specifies a Linux OS image. + * + * @return the windowsConfiguration value + */ + public WindowsConfiguration windowsConfiguration() { + return this.windowsConfiguration; + } + + /** + * Set this property must not be specified if the imageReference specifies a Linux OS image. + * + * @param windowsConfiguration the windowsConfiguration value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration) { + this.windowsConfiguration = windowsConfiguration; + return this; + } + + /** + * Get this property must be specified if the compute nodes in the pool need to have empty data disks attached to them. + * + * @return the dataDisks value + */ + public List dataDisks() { + return this.dataDisks; + } + + /** + * Set this property must be specified if the compute nodes in the pool need to have empty data disks attached to them. + * + * @param dataDisks the dataDisks value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withDataDisks(List dataDisks) { + this.dataDisks = dataDisks; + return this; + } + + /** + * Get this only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + * + * @return the licenseType value + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set this only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + * + * @param licenseType the licenseType value to set + * @return the VirtualMachineConfiguration object itself. + */ + public VirtualMachineConfiguration withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/WindowsConfiguration.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/WindowsConfiguration.java new file mode 100644 index 000000000000..44f191df0838 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/WindowsConfiguration.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Windows operating system settings to apply to the virtual machine. + */ +public class WindowsConfiguration { + /** + * Whether automatic updates are enabled on the virtual machine. + * If omitted, the default value is true. + */ + @JsonProperty(value = "enableAutomaticUpdates") + private Boolean enableAutomaticUpdates; + + /** + * Get if omitted, the default value is true. + * + * @return the enableAutomaticUpdates value + */ + public Boolean enableAutomaticUpdates() { + return this.enableAutomaticUpdates; + } + + /** + * Set if omitted, the default value is true. + * + * @param enableAutomaticUpdates the enableAutomaticUpdates value to set + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withEnableAutomaticUpdates(Boolean enableAutomaticUpdates) { + this.enableAutomaticUpdates = enableAutomaticUpdates; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationImpl.java new file mode 100644 index 000000000000..175a451db22d --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationImpl.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.Application; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackage; +import java.util.List; + +class ApplicationImpl extends IndexableRefreshableWrapperImpl implements Application { + private final BatchManager manager; + private String resourceGroupName; + private String accountName; + private String applicationId; + + ApplicationImpl(ApplicationInner inner, BatchManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts"); + this.applicationId = IdParsingUtils.getValueFromIdByName(inner.id(), "applications"); + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ApplicationsInner client = this.manager().inner().applications(); + return client.getAsync(this.resourceGroupName, this.accountName, this.applicationId); + } + + + + @Override + public Boolean allowUpdates() { + return this.inner().allowUpdates(); + } + + @Override + public String defaultVersion() { + return this.inner().defaultVersion(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List packages() { + List lst = new ArrayList(); + if (this.inner().packages() != null) { + for (ApplicationPackageInner inner : this.inner().packages()) { + lst.add( new ApplicationPackageImpl(inner, manager())); + } + } + return lst; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationInner.java new file mode 100644 index 000000000000..2f6120f62cf5 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationInner.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about an application in a Batch account. + */ +public class ApplicationInner { + /** + * A string that uniquely identifies the application within the account. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The display name for the application. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The list of packages under this application. + */ + @JsonProperty(value = "packages") + private List packages; + + /** + * A value indicating whether packages within the application may be + * overwritten using the same version string. + */ + @JsonProperty(value = "allowUpdates") + private Boolean allowUpdates; + + /** + * The package to use if a client requests the application but does not + * specify a version. + */ + @JsonProperty(value = "defaultVersion") + private String defaultVersion; + + /** + * Get a string that uniquely identifies the application within the account. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set a string that uniquely identifies the application within the account. + * + * @param id the id value to set + * @return the ApplicationInner object itself. + */ + public ApplicationInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the display name for the application. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the application. + * + * @param displayName the displayName value to set + * @return the ApplicationInner object itself. + */ + public ApplicationInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the list of packages under this application. + * + * @return the packages value + */ + public List packages() { + return this.packages; + } + + /** + * Set the list of packages under this application. + * + * @param packages the packages value to set + * @return the ApplicationInner object itself. + */ + public ApplicationInner withPackages(List packages) { + this.packages = packages; + return this; + } + + /** + * Get a value indicating whether packages within the application may be overwritten using the same version string. + * + * @return the allowUpdates value + */ + public Boolean allowUpdates() { + return this.allowUpdates; + } + + /** + * Set a value indicating whether packages within the application may be overwritten using the same version string. + * + * @param allowUpdates the allowUpdates value to set + * @return the ApplicationInner object itself. + */ + public ApplicationInner withAllowUpdates(Boolean allowUpdates) { + this.allowUpdates = allowUpdates; + return this; + } + + /** + * Get the package to use if a client requests the application but does not specify a version. + * + * @return the defaultVersion value + */ + public String defaultVersion() { + return this.defaultVersion; + } + + /** + * Set the package to use if a client requests the application but does not specify a version. + * + * @param defaultVersion the defaultVersion value to set + * @return the ApplicationInner object itself. + */ + public ApplicationInner withDefaultVersion(String defaultVersion) { + this.defaultVersion = defaultVersion; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageImpl.java new file mode 100644 index 000000000000..e1e2771021bc --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageImpl.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackage; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.batch.v2017_09_01.PackageState; + +class ApplicationPackageImpl extends IndexableRefreshableWrapperImpl implements ApplicationPackage { + private final BatchManager manager; + private String resourceGroupName; + private String accountName; + private String applicationId; + private String version; + + ApplicationPackageImpl(ApplicationPackageInner inner, BatchManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts"); + this.applicationId = IdParsingUtils.getValueFromIdByName(inner.id(), "applications"); + this.version = IdParsingUtils.getValueFromIdByName(inner.id(), "versions"); + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + ApplicationPackagesInner client = this.manager().inner().applicationPackages(); + return client.getAsync(this.resourceGroupName, this.accountName, this.applicationId, this.version); + } + + + + @Override + public String format() { + return this.inner().format(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastActivationTime() { + return this.inner().lastActivationTime(); + } + + @Override + public PackageState state() { + return this.inner().state(); + } + + @Override + public String storageUrl() { + return this.inner().storageUrl(); + } + + @Override + public DateTime storageUrlExpiry() { + return this.inner().storageUrlExpiry(); + } + + @Override + public String version() { + return this.inner().version(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageInner.java new file mode 100644 index 000000000000..3acec5f7e029 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackageInner.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.PackageState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An application package which represents a particular version of an + * application. + */ +public class ApplicationPackageInner { + /** + * The ID of the application. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The version of the application package. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * The current state of the application package. Possible values include: + * 'Pending', 'Active', 'Unmapped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private PackageState state; + + /** + * The format of the application package, if the package is active. + */ + @JsonProperty(value = "format", access = JsonProperty.Access.WRITE_ONLY) + private String format; + + /** + * The URL for the application package in Azure Storage. + */ + @JsonProperty(value = "storageUrl", access = JsonProperty.Access.WRITE_ONLY) + private String storageUrl; + + /** + * The UTC time at which the Azure Storage URL will expire. + */ + @JsonProperty(value = "storageUrlExpiry", access = JsonProperty.Access.WRITE_ONLY) + private DateTime storageUrlExpiry; + + /** + * The time at which the package was last activated, if the package is + * active. + */ + @JsonProperty(value = "lastActivationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastActivationTime; + + /** + * Get the ID of the application. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the version of the application package. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Get the current state of the application package. Possible values include: 'Pending', 'Active', 'Unmapped'. + * + * @return the state value + */ + public PackageState state() { + return this.state; + } + + /** + * Get the format of the application package, if the package is active. + * + * @return the format value + */ + public String format() { + return this.format; + } + + /** + * Get the URL for the application package in Azure Storage. + * + * @return the storageUrl value + */ + public String storageUrl() { + return this.storageUrl; + } + + /** + * Get the UTC time at which the Azure Storage URL will expire. + * + * @return the storageUrlExpiry value + */ + public DateTime storageUrlExpiry() { + return this.storageUrlExpiry; + } + + /** + * Get the time at which the package was last activated, if the package is active. + * + * @return the lastActivationTime value + */ + public DateTime lastActivationTime() { + return this.lastActivationTime; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesImpl.java new file mode 100644 index 000000000000..56c361175fef --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesImpl.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackage; + +class ApplicationPackagesImpl extends WrapperImpl implements ApplicationPackages { + private final BatchManager manager; + + ApplicationPackagesImpl(BatchManager manager) { + super(manager.inner().applicationPackages()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + private ApplicationPackageImpl wrapModel(ApplicationPackageInner inner) { + return new ApplicationPackageImpl(inner, manager()); + } + + @Override + public Completable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) { + ApplicationPackagesInner client = this.inner(); + return client.activateAsync(resourceGroupName, accountName, applicationId, version, format).toCompletable(); + } + + @Override + public Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version) { + ApplicationPackagesInner client = this.inner(); + return client.createAsync(resourceGroupName, accountName, applicationId, version) + .map(new Func1() { + @Override + public ApplicationPackage call(ApplicationPackageInner inner) { + return new ApplicationPackageImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version) { + ApplicationPackagesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, applicationId, version) + .map(new Func1() { + @Override + public ApplicationPackage call(ApplicationPackageInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version) { + ApplicationPackagesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, applicationId, version).toCompletable(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesInner.java new file mode 100644 index 000000000000..bc238dba4332 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationPackagesInner.java @@ -0,0 +1,484 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.batch.v2017_09_01.ActivateApplicationPackageParameters; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ApplicationPackages. + */ +public class ApplicationPackagesInner { + /** The Retrofit service to perform REST calls. */ + private ApplicationPackagesService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of ApplicationPackagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ApplicationPackagesInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(ApplicationPackagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ApplicationPackages to be + * used by Retrofit to perform actually REST calls. + */ + interface ApplicationPackagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages activate" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}/activate") + Observable> activate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ActivateApplicationPackageParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("version") String version, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Activates the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to activate. + * @param format The format of the application package binary file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void activate(String resourceGroupName, String accountName, String applicationId, String version, String format) { + activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format).toBlocking().single().body(); + } + + /** + * Activates the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to activate. + * @param format The format of the application package binary file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format), serviceCallback); + } + + /** + * Activates the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to activate. + * @param format The format of the application package binary file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable activateAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) { + return activateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version, format).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Activates the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to activate. + * @param format The format of the application package binary file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> activateWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version, String format) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (version == null) { + throw new IllegalArgumentException("Parameter version is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (format == null) { + throw new IllegalArgumentException("Parameter format is required and cannot be null."); + } + ActivateApplicationPackageParameters parameters = new ActivateApplicationPackageParameters(); + parameters.withFormat(format); + return service.activate(resourceGroupName, accountName, applicationId, version, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = activateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse activateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates an application package record. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationPackageInner object if successful. + */ + public ApplicationPackageInner create(String resourceGroupName, String accountName, String applicationId, String version) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body(); + } + + /** + * Creates an application package record. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback); + } + + /** + * Creates an application package record. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationPackageInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String applicationId, String version) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, ApplicationPackageInner>() { + @Override + public ApplicationPackageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an application package record. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationPackageInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (version == null) { + throw new IllegalArgumentException("Parameter version is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.create(resourceGroupName, accountName, applicationId, version, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an application package record and its associated binary file. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName, String applicationId, String version) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body(); + } + + /** + * Deletes an application package record and its associated binary file. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to delete. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback); + } + + /** + * Deletes an application package record and its associated binary file. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String applicationId, String version) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an application package record and its associated binary file. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (version == null) { + throw new IllegalArgumentException("Parameter version is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, accountName, applicationId, version, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationPackageInner object if successful. + */ + public ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationId, String version) { + return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().body(); + } + + /** + * Gets information about the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String accountName, String applicationId, String version, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version), serviceCallback); + } + + /** + * Gets information about the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationPackageInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String applicationId, String version) { + return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).map(new Func1, ApplicationPackageInner>() { + @Override + public ApplicationPackageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified application package. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param version The version of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationPackageInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (version == null) { + throw new IllegalArgumentException("Parameter version is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, accountName, applicationId, version, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsImpl.java new file mode 100644 index 000000000000..1e07a4fec174 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsImpl.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.Applications; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.batch.v2017_09_01.Application; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationUpdateParameters; + +class ApplicationsImpl extends WrapperImpl implements Applications { + private final BatchManager manager; + + ApplicationsImpl(BatchManager manager) { + super(manager.inner().applications()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + private ApplicationImpl wrapModel(ApplicationInner inner) { + return new ApplicationImpl(inner, manager()); + } + + @Override + public Observable createAsync(String resourceGroupName, String accountName, String applicationId) { + ApplicationsInner client = this.inner(); + return client.createAsync(resourceGroupName, accountName, applicationId) + .map(new Func1() { + @Override + public Application call(ApplicationInner inner) { + return new ApplicationImpl(inner, manager()); + } + }); + } + + @Override + public Completable updateAsync(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters) { + ApplicationsInner client = this.inner(); + return client.updateAsync(resourceGroupName, accountName, applicationId, parameters).toCompletable(); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String accountName) { + ApplicationsInner client = this.inner(); + return client.listAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Application call(ApplicationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String applicationId) { + ApplicationsInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, applicationId) + .map(new Func1() { + @Override + public Application call(ApplicationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String applicationId) { + ApplicationsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, applicationId).toCompletable(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsInner.java new file mode 100644 index 000000000000..84158a6e0ee7 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/ApplicationsInner.java @@ -0,0 +1,919 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationCreateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Applications. + */ +public class ApplicationsInner { + /** The Retrofit service to perform REST calls. */ + private ApplicationsService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of ApplicationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ApplicationsInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(ApplicationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Applications to be + * used by Retrofit to perform actually REST calls. + */ + interface ApplicationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Body ApplicationCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationId") String applicationId, @Path("subscriptionId") String subscriptionId, @Body ApplicationUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("maxresults") Integer maxresults, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Applications listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationInner object if successful. + */ + public ApplicationInner create(String resourceGroupName, String accountName, String applicationId) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body(); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String applicationId) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, ApplicationInner>() { + @Override + public ApplicationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final ApplicationCreateParameters parameters = null; + return service.create(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationInner object if successful. + */ + public ApplicationInner create(String resourceGroupName, String accountName, String applicationId, ApplicationCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).toBlocking().single().body(); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String applicationId, ApplicationCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters), serviceCallback); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable createAsync(String resourceGroupName, String accountName, String applicationId, ApplicationCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).map(new Func1, ApplicationInner>() { + @Override + public ApplicationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds an application to the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, ApplicationCreateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.create(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName, String applicationId) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body(); + } + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback); + } + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String applicationId) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationInner object if successful. + */ + public ApplicationInner get(String resourceGroupName, String accountName, String applicationId) { + return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().body(); + } + + /** + * Gets information about the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String accountName, String applicationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, applicationId), serviceCallback); + } + + /** + * Gets information about the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String applicationId) { + return getWithServiceResponseAsync(resourceGroupName, accountName, applicationId).map(new Func1, ApplicationInner>() { + @Override + public ApplicationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void update(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters) { + updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).toBlocking().single().body(); + } + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters), serviceCallback); + } + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable updateAsync(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param applicationId The ID of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, ApplicationUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (applicationId == null) { + throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, accountName, applicationId, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listSinglePageAsync(resourceGroupName, accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer maxresults = null; + return service.list(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String accountName, final Integer maxresults) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxresults).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName, maxresults), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { + return listWithServiceResponseAsync(resourceGroupName, accountName, maxresults) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { + return listSinglePageAsync(resourceGroupName, accountName, maxresults) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account. + ServiceResponse> * @param accountName The name of the Batch account. + ServiceResponse> * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all of the applications in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the applications in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the applications in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the applications in the specified account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountImpl.java new file mode 100644 index 000000000000..ba55c6106152 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountImpl.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccount; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountUpdateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountCreateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.AutoStorageProperties; +import com.microsoft.azure.management.batch.v2017_09_01.KeyVaultReference; +import com.microsoft.azure.management.batch.v2017_09_01.PoolAllocationMode; +import com.microsoft.azure.management.batch.v2017_09_01.ProvisioningState; +import com.microsoft.azure.management.batch.v2017_09_01.AutoStorageBaseProperties; +import rx.functions.Func1; + +class BatchAccountImpl extends GroupableResourceCoreImpl implements BatchAccount, BatchAccount.Definition, BatchAccount.Update { + private BatchAccountCreateParameters createParameter; + private BatchAccountUpdateParameters updateParameter; + BatchAccountImpl(String name, BatchAccountInner inner, BatchManager manager) { + super(name, inner, manager); + this.createParameter = new BatchAccountCreateParameters(); + this.updateParameter = new BatchAccountUpdateParameters(); + } + + @Override + public Observable createResourceAsync() { + BatchAccountsInner client = this.manager().inner().batchAccounts(); + this.createParameter.withLocation(inner().location()); + this.createParameter.withTags(inner().getTags()); + return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) + .map(new Func1() { + @Override + public BatchAccountInner call(BatchAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + BatchAccountsInner client = this.manager().inner().batchAccounts(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public BatchAccountInner call(BatchAccountInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + BatchAccountsInner client = this.manager().inner().batchAccounts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createParameter = new BatchAccountCreateParameters(); + this.updateParameter = new BatchAccountUpdateParameters(); + } + + @Override + public String accountEndpoint() { + return this.inner().accountEndpoint(); + } + + @Override + public int activeJobAndJobScheduleQuota() { + return this.inner().activeJobAndJobScheduleQuota(); + } + + @Override + public AutoStorageProperties autoStorage() { + return this.inner().autoStorage(); + } + + @Override + public int dedicatedCoreQuota() { + return this.inner().dedicatedCoreQuota(); + } + + @Override + public KeyVaultReference keyVaultReference() { + return this.inner().keyVaultReference(); + } + + @Override + public int lowPriorityCoreQuota() { + return this.inner().lowPriorityCoreQuota(); + } + + @Override + public PoolAllocationMode poolAllocationMode() { + return this.inner().poolAllocationMode(); + } + + @Override + public int poolQuota() { + return this.inner().poolQuota(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public BatchAccountImpl withKeyVaultReference(KeyVaultReference keyVaultReference) { + this.createParameter.withKeyVaultReference(keyVaultReference); + return this; + } + + @Override + public BatchAccountImpl withPoolAllocationMode(PoolAllocationMode poolAllocationMode) { + this.createParameter.withPoolAllocationMode(poolAllocationMode); + return this; + } + + @Override + public BatchAccountImpl withAutoStorage(AutoStorageBaseProperties autoStorage) { + if (isInCreateMode()) { + this.createParameter.withAutoStorage(autoStorage); + } else { + this.updateParameter.withAutoStorage(autoStorage); + } + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountInner.java new file mode 100644 index 000000000000..a6827d3b7c0a --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountInner.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.ProvisioningState; +import com.microsoft.azure.management.batch.v2017_09_01.PoolAllocationMode; +import com.microsoft.azure.management.batch.v2017_09_01.KeyVaultReference; +import com.microsoft.azure.management.batch.v2017_09_01.AutoStorageProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Contains information about an Azure Batch account. + */ +@JsonFlatten +@SkipParentValidation +public class BatchAccountInner extends Resource { + /** + * The account endpoint used to interact with the Batch service. + */ + @JsonProperty(value = "properties.accountEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String accountEndpoint; + + /** + * The provisioned state of the resource. Possible values include: + * 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Cancelled'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The allocation mode to use for creating pools in the Batch account. + * Possible values include: 'BatchService', 'UserSubscription'. + */ + @JsonProperty(value = "properties.poolAllocationMode", access = JsonProperty.Access.WRITE_ONLY) + private PoolAllocationMode poolAllocationMode; + + /** + * A reference to the Azure key vault associated with the Batch account. + */ + @JsonProperty(value = "properties.keyVaultReference", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultReference keyVaultReference; + + /** + * The properties and status of any auto-storage account associated with + * the Batch account. + */ + @JsonProperty(value = "properties.autoStorage", access = JsonProperty.Access.WRITE_ONLY) + private AutoStorageProperties autoStorage; + + /** + * The dedicated core quota for this Batch account. + */ + @JsonProperty(value = "properties.dedicatedCoreQuota", access = JsonProperty.Access.WRITE_ONLY) + private int dedicatedCoreQuota; + + /** + * The low-priority core quota for this Batch account. + */ + @JsonProperty(value = "properties.lowPriorityCoreQuota", access = JsonProperty.Access.WRITE_ONLY) + private int lowPriorityCoreQuota; + + /** + * The pool quota for this Batch account. + */ + @JsonProperty(value = "properties.poolQuota", access = JsonProperty.Access.WRITE_ONLY) + private int poolQuota; + + /** + * The active job and job schedule quota for this Batch account. + */ + @JsonProperty(value = "properties.activeJobAndJobScheduleQuota", access = JsonProperty.Access.WRITE_ONLY) + private int activeJobAndJobScheduleQuota; + + /** + * Get the account endpoint used to interact with the Batch service. + * + * @return the accountEndpoint value + */ + public String accountEndpoint() { + return this.accountEndpoint; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Cancelled'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get possible values include: 'BatchService', 'UserSubscription'. + * + * @return the poolAllocationMode value + */ + public PoolAllocationMode poolAllocationMode() { + return this.poolAllocationMode; + } + + /** + * Get the keyVaultReference value. + * + * @return the keyVaultReference value + */ + public KeyVaultReference keyVaultReference() { + return this.keyVaultReference; + } + + /** + * Get the autoStorage value. + * + * @return the autoStorage value + */ + public AutoStorageProperties autoStorage() { + return this.autoStorage; + } + + /** + * Get the dedicatedCoreQuota value. + * + * @return the dedicatedCoreQuota value + */ + public int dedicatedCoreQuota() { + return this.dedicatedCoreQuota; + } + + /** + * Get the lowPriorityCoreQuota value. + * + * @return the lowPriorityCoreQuota value + */ + public int lowPriorityCoreQuota() { + return this.lowPriorityCoreQuota; + } + + /** + * Get the poolQuota value. + * + * @return the poolQuota value + */ + public int poolQuota() { + return this.poolQuota; + } + + /** + * Get the activeJobAndJobScheduleQuota value. + * + * @return the activeJobAndJobScheduleQuota value + */ + public int activeJobAndJobScheduleQuota() { + return this.activeJobAndJobScheduleQuota; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysImpl.java new file mode 100644 index 000000000000..4aec1c482155 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysImpl.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class BatchAccountKeysImpl extends WrapperImpl implements BatchAccountKeys { + private final BatchManager manager; + BatchAccountKeysImpl(BatchAccountKeysInner inner, BatchManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public String accountName() { + return this.inner().accountName(); + } + + @Override + public String primary() { + return this.inner().primary(); + } + + @Override + public String secondary() { + return this.inner().secondary(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysInner.java new file mode 100644 index 000000000000..1a4cd7c2f26c --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountKeysInner.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A set of Azure Batch account keys. + */ +public class BatchAccountKeysInner { + /** + * The Batch account name. + */ + @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) + private String accountName; + + /** + * The primary key associated with the account. + */ + @JsonProperty(value = "primary", access = JsonProperty.Access.WRITE_ONLY) + private String primary; + + /** + * The secondary key associated with the account. + */ + @JsonProperty(value = "secondary", access = JsonProperty.Access.WRITE_ONLY) + private String secondary; + + /** + * Get the Batch account name. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Get the primary key associated with the account. + * + * @return the primary value + */ + public String primary() { + return this.primary; + } + + /** + * Get the secondary key associated with the account. + * + * @return the secondary value + */ + public String secondary() { + return this.secondary; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsImpl.java new file mode 100644 index 000000000000..171de89cca0f --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsImpl.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccount; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountKeys; +import com.microsoft.azure.management.batch.v2017_09_01.AccountKeyType; + +class BatchAccountsImpl extends GroupableResourcesCoreImpl implements BatchAccounts { + protected BatchAccountsImpl(BatchManager manager) { + super(manager.inner().batchAccounts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + BatchAccountsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + BatchAccountsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + BatchAccountsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + BatchAccountsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BatchAccount call(BatchAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + BatchAccountsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + BatchAccountsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BatchAccount call(BatchAccountInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public BatchAccountImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName) { + BatchAccountsInner client = this.inner(); + return client.synchronizeAutoStorageKeysAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + public Observable regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName) { + BatchAccountsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, accountName, keyName) + .map(new Func1() { + @Override + public BatchAccountKeys call(BatchAccountKeysInner inner) { + return new BatchAccountKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable getKeysAsync(String resourceGroupName, String accountName) { + BatchAccountsInner client = this.inner(); + return client.getKeysAsync(resourceGroupName, accountName) + .map(new Func1() { + @Override + public BatchAccountKeys call(BatchAccountKeysInner inner) { + return new BatchAccountKeysImpl(inner, manager()); + } + }); + } + + @Override + protected BatchAccountImpl wrapModel(BatchAccountInner inner) { + return new BatchAccountImpl(inner.name(), inner, manager()); + } + + @Override + protected BatchAccountImpl wrapModel(String name) { + return new BatchAccountImpl(name, new BatchAccountInner(), this.manager()); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsInner.java new file mode 100644 index 000000000000..a378c7a5ae0f --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchAccountsInner.java @@ -0,0 +1,1351 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.batch.v2017_09_01.AccountKeyType; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountCreateHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountCreateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountDeleteHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountRegenerateKeyParameters; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccountUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in BatchAccounts. + */ +public class BatchAccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private BatchAccountsService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of BatchAccountsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public BatchAccountsInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(BatchAccountsService.class); + this.client = client; + } + + /** + * The interface defining all the services for BatchAccounts to be + * used by Retrofit to perform actually REST calls. + */ + interface BatchAccountsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts synchronizeAutoStorageKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys") + Observable> synchronizeAutoStorageKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts regenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys") + Observable> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BatchAccountRegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts getKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys") + Observable> getKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountInner object if successful. + */ + public BatchAccountInner create(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, BatchAccountInner>() { + @Override + public BatchAccountInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), BatchAccountCreateHeaders.class); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountInner object if successful. + */ + public BatchAccountInner beginCreate(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, BatchAccountInner>() { + @Override + public BatchAccountInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. + * @param parameters Additional parameters for account creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreate(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BatchAccountCreateHeaders.class); + } + + /** + * Updates the properties of an existing Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param parameters Additional parameters for account update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountInner object if successful. + */ + public BatchAccountInner update(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); + } + + /** + * Updates the properties of an existing Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param parameters Additional parameters for account update. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); + } + + /** + * Updates the properties of an existing Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param parameters Additional parameters for account update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, BatchAccountInner>() { + @Override + public BatchAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the properties of an existing Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param parameters Additional parameters for account update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), BatchAccountDeleteHeaders.class); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, BatchAccountDeleteHeaders.class); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountInner object if successful. + */ + public BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, BatchAccountInner>() { + @Override + public BatchAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BatchAccountInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BatchAccountInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Synchronizes access keys for the auto-storage account configured for the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void synchronizeAutoStorageKeys(String resourceGroupName, String accountName) { + synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Synchronizes access keys for the auto-storage account configured for the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Synchronizes access keys for the auto-storage account configured for the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName) { + return synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Synchronizes access keys for the auto-storage account configured for the specified Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> synchronizeAutoStorageKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.synchronizeAutoStorageKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = synchronizeAutoStorageKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse synchronizeAutoStorageKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Regenerates the specified account key for the Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountKeysInner object if successful. + */ + public BatchAccountKeysInner regenerateKey(String resourceGroupName, String accountName, AccountKeyType keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); + } + + /** + * Regenerates the specified account key for the Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); + } + + /** + * Regenerates the specified account key for the Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountKeysInner object + */ + public Observable regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1, BatchAccountKeysInner>() { + @Override + public BatchAccountKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the specified account key for the Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountKeysInner object + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, AccountKeyType keyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + BatchAccountRegenerateKeyParameters parameters = new BatchAccountRegenerateKeyParameters(); + parameters.withKeyName(keyName); + return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the account keys for the specified Batch account. + * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchAccountKeysInner object if successful. + */ + public BatchAccountKeysInner getKeys(String resourceGroupName, String accountName) { + return getKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the account keys for the specified Batch account. + * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getKeysAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the account keys for the specified Batch account. + * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountKeysInner object + */ + public Observable getKeysAsync(String resourceGroupName, String accountName) { + return getKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, BatchAccountKeysInner>() { + @Override + public BatchAccountKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the account keys for the specified Batch account. + * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchAccountKeysInner object + */ + public Observable> getKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BatchAccountInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BatchAccountInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BatchAccountInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchAccountInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaImpl.java new file mode 100644 index 000000000000..0495080af5b6 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaImpl.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.BatchLocationQuota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class BatchLocationQuotaImpl extends WrapperImpl implements BatchLocationQuota { + private final BatchManager manager; + BatchLocationQuotaImpl(BatchLocationQuotaInner inner, BatchManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public Integer accountQuota() { + return this.inner().accountQuota(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaInner.java new file mode 100644 index 000000000000..bfc27c49f713 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchLocationQuotaInner.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Quotas associated with a Batch region for a particular subscription. + */ +public class BatchLocationQuotaInner { + /** + * The number of Batch accounts that may be created under the subscription + * in the specified region. + */ + @JsonProperty(value = "accountQuota", access = JsonProperty.Access.WRITE_ONLY) + private Integer accountQuota; + + /** + * Get the number of Batch accounts that may be created under the subscription in the specified region. + * + * @return the accountQuota value + */ + public Integer accountQuota() { + return this.accountQuota; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManagementClientImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManagementClientImpl.java new file mode 100644 index 000000000000..15e8375603ef --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManagementClientImpl.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the BatchManagementClientImpl class. + */ +public class BatchManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + private String subscriptionId; + + /** + * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public BatchManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The API version to be used with the HTTP request. */ + private String apiVersion; + + /** + * Gets The API version to be used with the HTTP request. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public BatchManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public BatchManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public BatchManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The BatchAccountsInner object to access its operations. + */ + private BatchAccountsInner batchAccounts; + + /** + * Gets the BatchAccountsInner object to access its operations. + * @return the BatchAccountsInner object. + */ + public BatchAccountsInner batchAccounts() { + return this.batchAccounts; + } + + /** + * The ApplicationPackagesInner object to access its operations. + */ + private ApplicationPackagesInner applicationPackages; + + /** + * Gets the ApplicationPackagesInner object to access its operations. + * @return the ApplicationPackagesInner object. + */ + public ApplicationPackagesInner applicationPackages() { + return this.applicationPackages; + } + + /** + * The ApplicationsInner object to access its operations. + */ + private ApplicationsInner applications; + + /** + * Gets the ApplicationsInner object to access its operations. + * @return the ApplicationsInner object. + */ + public ApplicationsInner applications() { + return this.applications; + } + + /** + * The LocationsInner object to access its operations. + */ + private LocationsInner locations; + + /** + * Gets the LocationsInner object to access its operations. + * @return the LocationsInner object. + */ + public LocationsInner locations() { + return this.locations; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The CertificatesInner object to access its operations. + */ + private CertificatesInner certificates; + + /** + * Gets the CertificatesInner object to access its operations. + * @return the CertificatesInner object. + */ + public CertificatesInner certificates() { + return this.certificates; + } + + /** + * The PoolsInner object to access its operations. + */ + private PoolsInner pools; + + /** + * Gets the PoolsInner object to access its operations. + * @return the PoolsInner object. + */ + public PoolsInner pools() { + return this.pools; + } + + /** + * Initializes an instance of BatchManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public BatchManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of BatchManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public BatchManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of BatchManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public BatchManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2017-09-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.batchAccounts = new BatchAccountsInner(restClient().retrofit(), this); + this.applicationPackages = new ApplicationPackagesInner(restClient().retrofit(), this); + this.applications = new ApplicationsInner(restClient().retrofit(), this); + this.locations = new LocationsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.certificates = new CertificatesInner(restClient().retrofit(), this); + this.pools = new PoolsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "BatchManagementClient", "2017-09-01"); + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManager.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManager.java new file mode 100644 index 000000000000..d9cc780b26fa --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/BatchManager.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.batch.v2017_09_01.BatchAccounts; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackages; +import com.microsoft.azure.management.batch.v2017_09_01.Applications; +import com.microsoft.azure.management.batch.v2017_09_01.Locations; +import com.microsoft.azure.management.batch.v2017_09_01.Operations; +import com.microsoft.azure.management.batch.v2017_09_01.Certificates; +import com.microsoft.azure.management.batch.v2017_09_01.Pools; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Batch resource management. + */ +public final class BatchManager extends ManagerCore { + private BatchAccounts batchAccounts; + private ApplicationPackages applicationPackages; + private Applications applications; + private Locations locations; + private Operations operations; + private Certificates certificates; + private Pools pools; + /** + * Get a Configurable instance that can be used to create BatchManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new BatchManager.ConfigurableImpl(); + } + /** + * Creates an instance of BatchManager that exposes Batch resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the BatchManager + */ + public static BatchManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new BatchManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of BatchManager that exposes Batch resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the BatchManager + */ + public static BatchManager authenticate(RestClient restClient, String subscriptionId) { + return new BatchManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of BatchManager that exposes Batch management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Batch management API entry points that work across subscriptions + */ + BatchManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage BatchAccounts. + */ + public BatchAccounts batchAccounts() { + if (this.batchAccounts == null) { + this.batchAccounts = new BatchAccountsImpl(this); + } + return this.batchAccounts; + } + + /** + * @return Entry point to manage ApplicationPackages. + */ + public ApplicationPackages applicationPackages() { + if (this.applicationPackages == null) { + this.applicationPackages = new ApplicationPackagesImpl(this); + } + return this.applicationPackages; + } + + /** + * @return Entry point to manage Applications. + */ + public Applications applications() { + if (this.applications == null) { + this.applications = new ApplicationsImpl(this); + } + return this.applications; + } + + /** + * @return Entry point to manage Locations. + */ + public Locations locations() { + if (this.locations == null) { + this.locations = new LocationsImpl(this); + } + return this.locations; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Certificates. + */ + public Certificates certificates() { + if (this.certificates == null) { + this.certificates = new CertificatesImpl(this); + } + return this.certificates; + } + + /** + * @return Entry point to manage Pools. + */ + public Pools pools() { + if (this.pools == null) { + this.pools = new PoolsImpl(this); + } + return this.pools; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public BatchManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return BatchManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private BatchManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new BatchManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateImpl.java new file mode 100644 index 000000000000..8a3c1b322f59 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateImpl.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.Certificate; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateCreateOrUpdateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.DeleteCertificateError; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateFormat; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateProvisioningState; +import org.joda.time.DateTime; +import rx.functions.Func1; + +class CertificateImpl extends CreatableUpdatableImpl implements Certificate, Certificate.Definition, Certificate.Update { + private final BatchManager manager; + private String resourceGroupName; + private String accountName; + private String certificateName; + private String cifMatch; + private String cifNoneMatch; + private String uifMatch; + private CertificateCreateOrUpdateParameters createOrUpdateParameter; + + CertificateImpl(String name, BatchManager manager) { + super(name, new CertificateInner()); + this.manager = manager; + // Set resource name + this.certificateName = name; + // + this.createOrUpdateParameter = new CertificateCreateOrUpdateParameters(); + } + + CertificateImpl(CertificateInner inner, BatchManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.certificateName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts"); + this.certificateName = IdParsingUtils.getValueFromIdByName(inner.id(), "certificates"); + // + this.createOrUpdateParameter = new CertificateCreateOrUpdateParameters(); + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.createAsync(this.resourceGroupName, this.accountName, this.certificateName, this.createOrUpdateParameter, this.cifMatch, this.cifNoneMatch) + .map(new Func1() { + @Override + public CertificateInner call(CertificateInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.certificateName, this.createOrUpdateParameter, this.uifMatch) + .map(new Func1() { + @Override + public CertificateInner call(CertificateInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.getAsync(this.resourceGroupName, this.accountName, this.certificateName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createOrUpdateParameter = new CertificateCreateOrUpdateParameters(); + } + + @Override + public DeleteCertificateError deleteCertificateError() { + return this.inner().deleteCertificateError(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public CertificateFormat format() { + return this.inner().format(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public CertificateProvisioningState previousProvisioningState() { + return this.inner().previousProvisioningState(); + } + + @Override + public DateTime previousProvisioningStateTransitionTime() { + return this.inner().previousProvisioningStateTransitionTime(); + } + + @Override + public CertificateProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DateTime provisioningStateTransitionTime() { + return this.inner().provisioningStateTransitionTime(); + } + + @Override + public String publicData() { + return this.inner().publicData(); + } + + @Override + public String thumbprint() { + return this.inner().thumbprint(); + } + + @Override + public String thumbprintAlgorithm() { + return this.inner().thumbprintAlgorithm(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public CertificateImpl withExistingBatchAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public CertificateImpl withIfNoneMatch(String ifNoneMatch) { + this.cifNoneMatch = ifNoneMatch; + return this; + } + + @Override + public CertificateImpl withData(String data) { + this.createOrUpdateParameter.withData(data); + return this; + } + + @Override + public CertificateImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.cifMatch = ifMatch; + } else { + this.uifMatch = ifMatch; + } + return this; + } + + @Override + public CertificateImpl withFormat(CertificateFormat format) { + this.createOrUpdateParameter.withFormat(format); + return this; + } + + @Override + public CertificateImpl withPassword(String password) { + this.createOrUpdateParameter.withPassword(password); + return this; + } + + @Override + public CertificateImpl withThumbprint(String thumbprint) { + this.createOrUpdateParameter.withThumbprint(thumbprint); + return this; + } + + @Override + public CertificateImpl withThumbprintAlgorithm(String thumbprintAlgorithm) { + this.createOrUpdateParameter.withThumbprintAlgorithm(thumbprintAlgorithm); + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateInner.java new file mode 100644 index 000000000000..82e64b43c6d0 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificateInner.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.CertificateFormat; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateProvisioningState; +import org.joda.time.DateTime; +import com.microsoft.azure.management.batch.v2017_09_01.DeleteCertificateError; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Contains information about a certificate. + */ +@JsonFlatten +public class CertificateInner extends ProxyResource { + /** + * The algorithm of the certificate thumbprint. + * This must match the first portion of the certificate name. Currently + * required to be 'SHA1'. + */ + @JsonProperty(value = "properties.thumbprintAlgorithm") + private String thumbprintAlgorithm; + + /** + * The thumbprint of the certificate. + * This must match the thumbprint from the name. + */ + @JsonProperty(value = "properties.thumbprint") + private String thumbprint; + + /** + * The format of the certificate - either Pfx or Cer. If omitted, the + * default is Pfx. Possible values include: 'Pfx', 'Cer'. + */ + @JsonProperty(value = "properties.format") + private CertificateFormat format; + + /** + * The provisioned state of the resource. + * Values are: + * + * Succeeded - The certificate is available for use in pools. + * Deleting - The user has requested that the certificate be deleted, but + * the delete operation has not yet completed. You may not reference the + * certificate when creating or updating pools. + * Failed - The user requested that the certificate be deleted, but there + * are pools that still have references to the certificate, or it is still + * installed on one or more compute nodes. (The latter can occur if the + * certificate has been removed from the pool, but the node has not yet + * restarted. Nodes refresh their certificates only when they restart.) You + * may use the cancel certificate delete operation to cancel the delete, or + * the delete certificate operation to retry the delete. Possible values + * include: 'Succeeded', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CertificateProvisioningState provisioningState; + + /** + * The time at which the certificate entered its current state. + */ + @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime provisioningStateTransitionTime; + + /** + * The previous provisioned state of the resource. Possible values include: + * 'Succeeded', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.previousProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CertificateProvisioningState previousProvisioningState; + + /** + * The time at which the certificate entered its previous state. + */ + @JsonProperty(value = "properties.previousProvisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime previousProvisioningStateTransitionTime; + + /** + * The public key of the certificate. + */ + @JsonProperty(value = "properties.publicData", access = JsonProperty.Access.WRITE_ONLY) + private String publicData; + + /** + * The error which occurred while deleting the certificate. + * This is only returned when the certificate provisioningState is + * 'Failed'. + */ + @JsonProperty(value = "properties.deleteCertificateError", access = JsonProperty.Access.WRITE_ONLY) + private DeleteCertificateError deleteCertificateError; + + /** + * The ETag of the resource, used for concurrency statements. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @return the thumbprintAlgorithm value + */ + public String thumbprintAlgorithm() { + return this.thumbprintAlgorithm; + } + + /** + * Set this must match the first portion of the certificate name. Currently required to be 'SHA1'. + * + * @param thumbprintAlgorithm the thumbprintAlgorithm value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withThumbprintAlgorithm(String thumbprintAlgorithm) { + this.thumbprintAlgorithm = thumbprintAlgorithm; + return this; + } + + /** + * Get this must match the thumbprint from the name. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set this must match the thumbprint from the name. + * + * @param thumbprint the thumbprint value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @return the format value + */ + public CertificateFormat format() { + return this.format; + } + + /** + * Set the format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer'. + * + * @param format the format value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withFormat(CertificateFormat format) { + this.format = format; + return this; + } + + /** + * Get values are: + Succeeded - The certificate is available for use in pools. + Deleting - The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + Failed - The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. Possible values include: 'Succeeded', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public CertificateProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningStateTransitionTime value. + * + * @return the provisioningStateTransitionTime value + */ + public DateTime provisioningStateTransitionTime() { + return this.provisioningStateTransitionTime; + } + + /** + * Get the previous provisioned state of the resource. Possible values include: 'Succeeded', 'Deleting', 'Failed'. + * + * @return the previousProvisioningState value + */ + public CertificateProvisioningState previousProvisioningState() { + return this.previousProvisioningState; + } + + /** + * Get the previousProvisioningStateTransitionTime value. + * + * @return the previousProvisioningStateTransitionTime value + */ + public DateTime previousProvisioningStateTransitionTime() { + return this.previousProvisioningStateTransitionTime; + } + + /** + * Get the public key of the certificate. + * + * @return the publicData value + */ + public String publicData() { + return this.publicData; + } + + /** + * Get this is only returned when the certificate provisioningState is 'Failed'. + * + * @return the deleteCertificateError value + */ + public DeleteCertificateError deleteCertificateError() { + return this.deleteCertificateError; + } + + /** + * Get the ETag of the resource, used for concurrency statements. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesImpl.java new file mode 100644 index 000000000000..dd23c908f515 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesImpl.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.Certificates; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.batch.v2017_09_01.Certificate; + +class CertificatesImpl extends WrapperImpl implements Certificates { + private final BatchManager manager; + + CertificatesImpl(BatchManager manager) { + super(manager.inner().certificates()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + @Override + public CertificateImpl define(String name) { + return wrapModel(name); + } + + private CertificateImpl wrapModel(CertificateInner inner) { + return new CertificateImpl(inner, manager()); + } + + private CertificateImpl wrapModel(String name) { + return new CertificateImpl(name, this.manager()); + } + + @Override + public Observable cancelDeletionAsync(String resourceGroupName, String accountName, String certificateName) { + CertificatesInner client = this.inner(); + return client.cancelDeletionAsync(resourceGroupName, accountName, certificateName) + .map(new Func1() { + @Override + public Certificate call(CertificateInner inner) { + return new CertificateImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByBatchAccountAsync(final String resourceGroupName, final String accountName) { + CertificatesInner client = this.inner(); + return client.listByBatchAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Certificate call(CertificateInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String certificateName) { + CertificatesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, certificateName) + .map(new Func1() { + @Override + public Certificate call(CertificateInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String certificateName) { + CertificatesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, certificateName).toCompletable(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesInner.java new file mode 100644 index 000000000000..e0d2884de4d7 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CertificatesInner.java @@ -0,0 +1,1420 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateCancelDeletionHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateCreateHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateCreateOrUpdateParameters; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateDeleteHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateGetHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateUpdateHeaders; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Certificates. + */ +public class CertificatesInner { + /** The Retrofit service to perform REST calls. */ + private CertificatesService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of CertificatesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public CertificatesInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(CertificatesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Certificates to be + * used by Retrofit to perform actually REST calls. + */ + interface CertificatesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates listByBatchAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates") + Observable> listByBatchAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("maxresults") Integer maxresults, @Query("$select") String select, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Body CertificateCreateOrUpdateParameters parameters, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Body CertificateCreateOrUpdateParameters parameters, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Body CertificateCreateOrUpdateParameters parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates cancelDeletion" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete") + Observable> cancelDeletion(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("certificateName") String certificateName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Certificates listByBatchAccountNext" }) + @GET + Observable> listByBatchAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listByBatchAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByBatchAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listByBatchAccountAsync(final String resourceGroupName, final String accountName) { + return listByBatchAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listByBatchAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByBatchAccountSinglePageAsync(resourceGroupName, accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer maxresults = null; + final String select = null; + final String filter = null; + return service.listByBatchAccount(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, select, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listByBatchAccount(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + ServiceResponse> response = listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + return listByBatchAccountWithServiceResponseAsync(resourceGroupName, accountName, maxresults, select, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listByBatchAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + return listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account. + ServiceResponse> * @param accountName The name of the Batch account. + ServiceResponse> * @param maxresults The maximum number of items to return in the response. + ServiceResponse> * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + ServiceResponse> * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name". + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountSinglePageAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByBatchAccount(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, select, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByBatchAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner create(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).toBlocking().last().body(); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters), serviceCallback); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + final String ifNoneMatch = null; + Observable> observable = service.create(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), CertificateCreateHeaders.class); + } + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner create(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + return createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch).toBlocking().last().body(); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch), serviceCallback); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + return createWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.create(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), CertificateCreateHeaders.class); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner beginCreate(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).toBlocking().single().body(); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters), serviceCallback); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + final String ifNoneMatch = null; + return service.beginCreate(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner beginCreate(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch).toBlocking().single().body(); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch), serviceCallback); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new certificate inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreate(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, CertificateCreateHeaders.class); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner update(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).toBlocking().single().body(); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters), serviceCallback); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + return service.update(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner update(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch).toBlocking().single().body(); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch), serviceCallback); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates the properties of an existing certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param parameters Certificate entity to update. + * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, CertificateUpdateHeaders.class); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName, String certificateName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName).toBlocking().last().body(); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String certificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName), serviceCallback); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String certificateName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), CertificateDeleteHeaders.class); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String accountName, String certificateName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName).toBlocking().single().body(); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String accountName, String certificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName), serviceCallback); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName, String certificateName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, certificateName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, CertificateDeleteHeaders.class); + } + + /** + * Gets information about the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner get(String resourceGroupName, String accountName, String certificateName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, certificateName).toBlocking().single().body(); + } + + /** + * Gets information about the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String accountName, String certificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, accountName, certificateName), serviceCallback); + } + + /** + * Gets information about the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String certificateName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, certificateName).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, CertificateGetHeaders.class); + } + + /** + * Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CertificateInner object if successful. + */ + public CertificateInner cancelDeletion(String resourceGroupName, String accountName, String certificateName) { + return cancelDeletionWithServiceResponseAsync(resourceGroupName, accountName, certificateName).toBlocking().single().body(); + } + + /** + * Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelDeletionAsync(String resourceGroupName, String accountName, String certificateName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(cancelDeletionWithServiceResponseAsync(resourceGroupName, accountName, certificateName), serviceCallback); + } + + /** + * Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable cancelDeletionAsync(String resourceGroupName, String accountName, String certificateName) { + return cancelDeletionWithServiceResponseAsync(resourceGroupName, accountName, certificateName).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Cancels a failed deletion of a certificate from the specified account. + * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CertificateInner object + */ + public Observable> cancelDeletionWithServiceResponseAsync(String resourceGroupName, String accountName, String certificateName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (certificateName == null) { + throw new IllegalArgumentException("Parameter certificateName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.cancelDeletion(resourceGroupName, accountName, certificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = cancelDeletionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders cancelDeletionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, CertificateCancelDeletionHeaders.class); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listByBatchAccountNext(final String nextPageLink) { + ServiceResponse> response = listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the certificates in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listByBatchAccountNextAsync(final String nextPageLink) { + return listByBatchAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listByBatchAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the certificates in the specified account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByBatchAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByBatchAccountNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultImpl.java new file mode 100644 index 000000000000..d30c6485348b --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.CheckNameAvailabilityResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.NameAvailabilityReason; + +class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult { + private final BatchManager manager; + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, BatchManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public NameAvailabilityReason reason() { + return this.inner().reason(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultInner.java new file mode 100644 index 000000000000..cda09adabb3e --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/CheckNameAvailabilityResultInner.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.NameAvailabilityReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CheckNameAvailability operation response. + */ +public class CheckNameAvailabilityResultInner { + /** + * Gets a boolean value that indicates whether the name is available for + * you to use. If true, the name is available. If false, the name has + * already been taken or invalid and cannot be used. + */ + @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean nameAvailable; + + /** + * Gets the reason that a Batch account name could not be used. The Reason + * element is only returned if NameAvailable is false. Possible values + * include: 'Invalid', 'AlreadyExists'. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private NameAvailabilityReason reason; + + /** + * Gets an error message explaining the Reason value in more detail. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'Invalid', 'AlreadyExists'. + * + * @return the reason value + */ + public NameAvailabilityReason reason() { + return this.reason; + } + + /** + * Get gets an error message explaining the Reason value in more detail. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/IdParsingUtils.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..f02372ce7ffc --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsImpl.java new file mode 100644 index 000000000000..b87b9192a22c --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.Locations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.batch.v2017_09_01.BatchLocationQuota; +import com.microsoft.azure.management.batch.v2017_09_01.CheckNameAvailabilityResult; + +class LocationsImpl extends WrapperImpl implements Locations { + private final BatchManager manager; + + LocationsImpl(BatchManager manager) { + super(manager.inner().locations()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + @Override + public Observable getQuotasAsync(String locationName) { + LocationsInner client = this.inner(); + return client.getQuotasAsync(locationName) + .map(new Func1() { + @Override + public BatchLocationQuota call(BatchLocationQuotaInner inner) { + return new BatchLocationQuotaImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String locationName, String name) { + LocationsInner client = this.inner(); + return client.checkNameAvailabilityAsync(locationName, name) + .map(new Func1() { + @Override + public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) { + return new CheckNameAvailabilityResultImpl(inner, manager()); + } + }); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsInner.java new file mode 100644 index 000000000000..c446bbdb6542 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/LocationsInner.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.batch.v2017_09_01.CheckNameAvailabilityParameters; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Locations. + */ +public class LocationsInner { + /** The Retrofit service to perform REST calls. */ + private LocationsService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of LocationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LocationsInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(LocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Locations to be + * used by Retrofit to perform actually REST calls. + */ + interface LocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Locations getQuotas" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas") + Observable> getQuotas(@Path("locationName") String locationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Locations checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability") + Observable> checkNameAvailability(@Path("locationName") String locationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityParameters parameters, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the Batch service quotas for the specified subscription at the given location. + * + * @param locationName The region for which to retrieve Batch service quotas. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the BatchLocationQuotaInner object if successful. + */ + public BatchLocationQuotaInner getQuotas(String locationName) { + return getQuotasWithServiceResponseAsync(locationName).toBlocking().single().body(); + } + + /** + * Gets the Batch service quotas for the specified subscription at the given location. + * + * @param locationName The region for which to retrieve Batch service quotas. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getQuotasAsync(String locationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getQuotasWithServiceResponseAsync(locationName), serviceCallback); + } + + /** + * Gets the Batch service quotas for the specified subscription at the given location. + * + * @param locationName The region for which to retrieve Batch service quotas. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchLocationQuotaInner object + */ + public Observable getQuotasAsync(String locationName) { + return getQuotasWithServiceResponseAsync(locationName).map(new Func1, BatchLocationQuotaInner>() { + @Override + public BatchLocationQuotaInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Batch service quotas for the specified subscription at the given location. + * + * @param locationName The region for which to retrieve Batch service quotas. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchLocationQuotaInner object + */ + public Observable> getQuotasWithServiceResponseAsync(String locationName) { + if (locationName == null) { + throw new IllegalArgumentException("Parameter locationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getQuotas(locationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getQuotasDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getQuotasDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks whether the Batch account name is available in the specified region. + * + * @param locationName The desired region for the name check. + * @param name The name to check for availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameAvailabilityResultInner object if successful. + */ + public CheckNameAvailabilityResultInner checkNameAvailability(String locationName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(locationName, name).toBlocking().single().body(); + } + + /** + * Checks whether the Batch account name is available in the specified region. + * + * @param locationName The desired region for the name check. + * @param name The name to check for availability + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String locationName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(locationName, name), serviceCallback); + } + + /** + * Checks whether the Batch account name is available in the specified region. + * + * @param locationName The desired region for the name check. + * @param name The name to check for availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable checkNameAvailabilityAsync(String locationName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(locationName, name).map(new Func1, CheckNameAvailabilityResultInner>() { + @Override + public CheckNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the Batch account name is available in the specified region. + * + * @param locationName The desired region for the name check. + * @param name The name to check for availability + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameAvailabilityResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String locationName, String name) { + if (locationName == null) { + throw new IllegalArgumentException("Parameter locationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + CheckNameAvailabilityParameters parameters = new CheckNameAvailabilityParameters(); + parameters.withName(name); + return service.checkNameAvailability(locationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationImpl.java new file mode 100644 index 000000000000..79662771a867 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationImpl.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.OperationDisplay; + +class OperationImpl extends WrapperImpl implements Operation { + private final BatchManager manager; + OperationImpl(OperationInner inner, BatchManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationInner.java new file mode 100644 index 000000000000..3d1773bf2495 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationInner.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A REST API operation. + */ +public class OperationInner { + /** + * The operation name. + * This is of the format {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The object that describes the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * The intended executor of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get this is of the format {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set this is of the format {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display value. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display value. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin value. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin value. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsImpl.java new file mode 100644 index 000000000000..8fdf33aa1046 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.batch.v2017_09_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final BatchManager manager; + + OperationsImpl(BatchManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsInner.java new file mode 100644 index 000000000000..534574132e51 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Operations list" }) + @GET("providers/Microsoft.Batch/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists available operations for the Microsoft.Batch provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PageImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PageImpl.java new file mode 100644 index 000000000000..0cf84e6cdc78 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolImpl.java new file mode 100644 index 000000000000..b6441a2347fb --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolImpl.java @@ -0,0 +1,338 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.management.batch.v2017_09_01.Pool; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.batch.v2017_09_01.PoolProvisioningState; +import com.microsoft.azure.management.batch.v2017_09_01.AllocationState; +import com.microsoft.azure.management.batch.v2017_09_01.DeploymentConfiguration; +import com.microsoft.azure.management.batch.v2017_09_01.ScaleSettings; +import com.microsoft.azure.management.batch.v2017_09_01.AutoScaleRun; +import com.microsoft.azure.management.batch.v2017_09_01.InterNodeCommunicationState; +import com.microsoft.azure.management.batch.v2017_09_01.NetworkConfiguration; +import com.microsoft.azure.management.batch.v2017_09_01.TaskSchedulingPolicy; +import java.util.List; +import com.microsoft.azure.management.batch.v2017_09_01.UserAccount; +import com.microsoft.azure.management.batch.v2017_09_01.MetadataItem; +import com.microsoft.azure.management.batch.v2017_09_01.StartTask; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateReference; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackageReference; +import com.microsoft.azure.management.batch.v2017_09_01.ResizeOperationStatus; + +class PoolImpl extends CreatableUpdatableImpl implements Pool, Pool.Definition, Pool.Update { + private final BatchManager manager; + private String resourceGroupName; + private String accountName; + private String poolName; + private String cifMatch; + private String cifNoneMatch; + private String uifMatch; + + PoolImpl(String name, BatchManager manager) { + super(name, new PoolInner()); + this.manager = manager; + // Set resource name + this.poolName = name; + // + } + + PoolImpl(PoolInner inner, BatchManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.poolName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "batchAccounts"); + this.poolName = IdParsingUtils.getValueFromIdByName(inner.id(), "pools"); + // + } + + @Override + public BatchManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PoolsInner client = this.manager().inner().pools(); + return client.createAsync(this.resourceGroupName, this.accountName, this.poolName, this.inner(), this.cifMatch, this.cifNoneMatch) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + PoolsInner client = this.manager().inner().pools(); + return client.updateAsync(this.resourceGroupName, this.accountName, this.poolName, this.inner(), this.uifMatch) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PoolsInner client = this.manager().inner().pools(); + return client.getAsync(this.resourceGroupName, this.accountName, this.poolName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public AllocationState allocationState() { + return this.inner().allocationState(); + } + + @Override + public DateTime allocationStateTransitionTime() { + return this.inner().allocationStateTransitionTime(); + } + + @Override + public List applicationLicenses() { + return this.inner().applicationLicenses(); + } + + @Override + public List applicationPackages() { + return this.inner().applicationPackages(); + } + + @Override + public AutoScaleRun autoScaleRun() { + return this.inner().autoScaleRun(); + } + + @Override + public List certificates() { + return this.inner().certificates(); + } + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public Integer currentDedicatedNodes() { + return this.inner().currentDedicatedNodes(); + } + + @Override + public Integer currentLowPriorityNodes() { + return this.inner().currentLowPriorityNodes(); + } + + @Override + public DeploymentConfiguration deploymentConfiguration() { + return this.inner().deploymentConfiguration(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public InterNodeCommunicationState interNodeCommunication() { + return this.inner().interNodeCommunication(); + } + + @Override + public DateTime lastModified() { + return this.inner().lastModified(); + } + + @Override + public Integer maxTasksPerNode() { + return this.inner().maxTasksPerNode(); + } + + @Override + public List metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public NetworkConfiguration networkConfiguration() { + return this.inner().networkConfiguration(); + } + + @Override + public PoolProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DateTime provisioningStateTransitionTime() { + return this.inner().provisioningStateTransitionTime(); + } + + @Override + public ResizeOperationStatus resizeOperationStatus() { + return this.inner().resizeOperationStatus(); + } + + @Override + public ScaleSettings scaleSettings() { + return this.inner().scaleSettings(); + } + + @Override + public StartTask startTask() { + return this.inner().startTask(); + } + + @Override + public TaskSchedulingPolicy taskSchedulingPolicy() { + return this.inner().taskSchedulingPolicy(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List userAccounts() { + return this.inner().userAccounts(); + } + + @Override + public String vmSize() { + return this.inner().vmSize(); + } + + @Override + public PoolImpl withExistingBatchAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + @Override + public PoolImpl withIfNoneMatch(String ifNoneMatch) { + this.cifNoneMatch = ifNoneMatch; + return this; + } + + @Override + public PoolImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.cifMatch = ifMatch; + } else { + this.uifMatch = ifMatch; + } + return this; + } + + @Override + public PoolImpl withApplicationLicenses(List applicationLicenses) { + this.inner().withApplicationLicenses(applicationLicenses); + return this; + } + + @Override + public PoolImpl withApplicationPackages(List applicationPackages) { + this.inner().withApplicationPackages(applicationPackages); + return this; + } + + @Override + public PoolImpl withCertificates(List certificates) { + this.inner().withCertificates(certificates); + return this; + } + + @Override + public PoolImpl withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { + this.inner().withDeploymentConfiguration(deploymentConfiguration); + return this; + } + + @Override + public PoolImpl withDisplayName(String displayName) { + this.inner().withDisplayName(displayName); + return this; + } + + @Override + public PoolImpl withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication) { + this.inner().withInterNodeCommunication(interNodeCommunication); + return this; + } + + @Override + public PoolImpl withMaxTasksPerNode(Integer maxTasksPerNode) { + this.inner().withMaxTasksPerNode(maxTasksPerNode); + return this; + } + + @Override + public PoolImpl withMetadata(List metadata) { + this.inner().withMetadata(metadata); + return this; + } + + @Override + public PoolImpl withNetworkConfiguration(NetworkConfiguration networkConfiguration) { + this.inner().withNetworkConfiguration(networkConfiguration); + return this; + } + + @Override + public PoolImpl withScaleSettings(ScaleSettings scaleSettings) { + this.inner().withScaleSettings(scaleSettings); + return this; + } + + @Override + public PoolImpl withStartTask(StartTask startTask) { + this.inner().withStartTask(startTask); + return this; + } + + @Override + public PoolImpl withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy) { + this.inner().withTaskSchedulingPolicy(taskSchedulingPolicy); + return this; + } + + @Override + public PoolImpl withUserAccounts(List userAccounts) { + this.inner().withUserAccounts(userAccounts); + return this; + } + + @Override + public PoolImpl withVmSize(String vmSize) { + this.inner().withVmSize(vmSize); + return this; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolInner.java new file mode 100644 index 000000000000..4df5ab5cad51 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolInner.java @@ -0,0 +1,639 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.batch.v2017_09_01.PoolProvisioningState; +import com.microsoft.azure.management.batch.v2017_09_01.AllocationState; +import com.microsoft.azure.management.batch.v2017_09_01.DeploymentConfiguration; +import com.microsoft.azure.management.batch.v2017_09_01.ScaleSettings; +import com.microsoft.azure.management.batch.v2017_09_01.AutoScaleRun; +import com.microsoft.azure.management.batch.v2017_09_01.InterNodeCommunicationState; +import com.microsoft.azure.management.batch.v2017_09_01.NetworkConfiguration; +import com.microsoft.azure.management.batch.v2017_09_01.TaskSchedulingPolicy; +import java.util.List; +import com.microsoft.azure.management.batch.v2017_09_01.UserAccount; +import com.microsoft.azure.management.batch.v2017_09_01.MetadataItem; +import com.microsoft.azure.management.batch.v2017_09_01.StartTask; +import com.microsoft.azure.management.batch.v2017_09_01.CertificateReference; +import com.microsoft.azure.management.batch.v2017_09_01.ApplicationPackageReference; +import com.microsoft.azure.management.batch.v2017_09_01.ResizeOperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Contains information about a pool. + */ +@JsonFlatten +public class PoolInner extends ProxyResource { + /** + * The display name for the pool. + * The display name need not be unique and can contain any Unicode + * characters up to a maximum length of 1024. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * The last modified time of the pool. + * This is the last time at which the pool level data, such as the + * targetDedicatedNodes or autoScaleSettings, changed. It does not factor + * in node-level changes such as a compute node changing state. + */ + @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModified; + + /** + * The creation time of the pool. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * The current state of the pool. + * Values are: + * + * Succeeded - The pool is available to run tasks subject to the + * availability of compute nodes. + * Deleting - The user has requested that the pool be deleted, but the + * delete operation has not yet completed. Possible values include: + * 'Succeeded', 'Deleting'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PoolProvisioningState provisioningState; + + /** + * The time at which the pool entered its current state. + */ + @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime provisioningStateTransitionTime; + + /** + * Whether the pool is resizing. + * Values are: + * + * Steady - The pool is not resizing. There are no changes to the number of + * nodes in the pool in progress. A pool enters this state when it is + * created and when no operations are being performed on the pool to change + * the number of dedicated nodes. + * Resizing - The pool is resizing; that is, compute nodes are being added + * to or removed from the pool. + * Stopping - The pool was resizing, but the user has requested that the + * resize be stopped, but the stop request has not yet been completed. + * Possible values include: 'Steady', 'Resizing', 'Stopping'. + */ + @JsonProperty(value = "properties.allocationState", access = JsonProperty.Access.WRITE_ONLY) + private AllocationState allocationState; + + /** + * The time at which the pool entered its current allocation state. + */ + @JsonProperty(value = "properties.allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime allocationStateTransitionTime; + + /** + * The size of virtual machines in the pool. All VMs in a pool are the same + * size. + * For information about available sizes of virtual machines for Cloud + * Services pools (pools created with cloudServiceConfiguration), see Sizes + * for Cloud Services + * (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + * Batch supports all Cloud Services VM sizes except ExtraSmall. For + * information about available VM sizes for pools using images from the + * Virtual Machines Marketplace (pools created with + * virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + * or Sizes for Virtual Machines (Windows) + * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + * Batch supports all Azure VM sizes except STANDARD_A0 and those with + * premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + */ + @JsonProperty(value = "properties.vmSize") + private String vmSize; + + /** + * This property describes how the pool nodes will be deployed - using + * Cloud Services or Virtual Machines. + * Using CloudServiceConfiguration specifies that the nodes should be + * creating using Azure Cloud Services (PaaS), while + * VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). + */ + @JsonProperty(value = "properties.deploymentConfiguration") + private DeploymentConfiguration deploymentConfiguration; + + /** + * The number of compute nodes currently in the pool. + */ + @JsonProperty(value = "properties.currentDedicatedNodes", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentDedicatedNodes; + + /** + * The number of low priority compute nodes currently in the pool. + */ + @JsonProperty(value = "properties.currentLowPriorityNodes", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentLowPriorityNodes; + + /** + * Settings which configure the number of nodes in the pool. + */ + @JsonProperty(value = "properties.scaleSettings") + private ScaleSettings scaleSettings; + + /** + * The results and errors from the last execution of the autoscale formula. + * This property is set only if the pool automatically scales, i.e. + * autoScaleSettings are used. + */ + @JsonProperty(value = "properties.autoScaleRun", access = JsonProperty.Access.WRITE_ONLY) + private AutoScaleRun autoScaleRun; + + /** + * Whether the pool permits direct communication between nodes. + * This imposes restrictions on which nodes can be assigned to the pool. + * Enabling this value can reduce the chance of the requested number of + * nodes to be allocated in the pool. If not specified, this value defaults + * to 'Disabled'. Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.interNodeCommunication") + private InterNodeCommunicationState interNodeCommunication; + + /** + * The network configuration for the pool. + */ + @JsonProperty(value = "properties.networkConfiguration") + private NetworkConfiguration networkConfiguration; + + /** + * The maximum number of tasks that can run concurrently on a single + * compute node in the pool. + */ + @JsonProperty(value = "properties.maxTasksPerNode") + private Integer maxTasksPerNode; + + /** + * How tasks are distributed across compute nodes in a pool. + */ + @JsonProperty(value = "properties.taskSchedulingPolicy") + private TaskSchedulingPolicy taskSchedulingPolicy; + + /** + * The list of user accounts to be created on each node in the pool. + */ + @JsonProperty(value = "properties.userAccounts") + private List userAccounts; + + /** + * A list of name-value pairs associated with the pool as metadata. + * The Batch service does not assign any meaning to metadata; it is solely + * for the use of user code. + */ + @JsonProperty(value = "properties.metadata") + private List metadata; + + /** + * A task specified to run on each compute node as it joins the pool. + * In an PATCH (update) operation, this property can be set to an empty + * object to remove the start task from the pool. + */ + @JsonProperty(value = "properties.startTask") + private StartTask startTask; + + /** + * The list of certificates to be installed on each compute node in the + * pool. + * For Windows compute nodes, the Batch service installs the certificates + * to the specified certificate store and location. For Linux compute + * nodes, the certificates are stored in a directory inside the task + * working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR + * is supplied to the task to query for this location. For certificates + * with visibility of 'remoteUser', a 'certs' directory is created in the + * user's home directory (e.g., /home/{user-name}/certs) and certificates + * are placed in that directory. + */ + @JsonProperty(value = "properties.certificates") + private List certificates; + + /** + * The list of application packages to be installed on each compute node in + * the pool. + * Changes to application packages affect all new compute nodes joining the + * pool, but do not affect compute nodes that are already in the pool until + * they are rebooted or reimaged. + */ + @JsonProperty(value = "properties.applicationPackages") + private List applicationPackages; + + /** + * The list of application licenses the Batch service will make available + * on each compute node in the pool. + * The list of application licenses must be a subset of available Batch + * service application licenses. If a license is requested which is not + * supported, pool creation will fail. + */ + @JsonProperty(value = "properties.applicationLicenses") + private List applicationLicenses; + + /** + * Contains details about the current or last completed resize operation. + */ + @JsonProperty(value = "properties.resizeOperationStatus", access = JsonProperty.Access.WRITE_ONLY) + private ResizeOperationStatus resizeOperationStatus; + + /** + * The ETag of the resource, used for concurrency statements. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + * + * @param displayName the displayName value to set + * @return the PoolInner object itself. + */ + public PoolInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get this is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state. + * + * @return the lastModified value + */ + public DateTime lastModified() { + return this.lastModified; + } + + /** + * Get the creationTime value. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get values are: + Succeeded - The pool is available to run tasks subject to the availability of compute nodes. + Deleting - The user has requested that the pool be deleted, but the delete operation has not yet completed. Possible values include: 'Succeeded', 'Deleting'. + * + * @return the provisioningState value + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningStateTransitionTime value. + * + * @return the provisioningStateTransitionTime value + */ + public DateTime provisioningStateTransitionTime() { + return this.provisioningStateTransitionTime; + } + + /** + * Get values are: + Steady - The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of dedicated nodes. + Resizing - The pool is resizing; that is, compute nodes are being added to or removed from the pool. + Stopping - The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. Possible values include: 'Steady', 'Resizing', 'Stopping'. + * + * @return the allocationState value + */ + public AllocationState allocationState() { + return this.allocationState; + } + + /** + * Get the allocationStateTransitionTime value. + * + * @return the allocationStateTransitionTime value + */ + public DateTime allocationStateTransitionTime() { + return this.allocationStateTransitionTime; + } + + /** + * Get for information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + * + * @return the vmSize value + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set for information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + * + * @param vmSize the vmSize value to set + * @return the PoolInner object itself. + */ + public PoolInner withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). + * + * @return the deploymentConfiguration value + */ + public DeploymentConfiguration deploymentConfiguration() { + return this.deploymentConfiguration; + } + + /** + * Set using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). + * + * @param deploymentConfiguration the deploymentConfiguration value to set + * @return the PoolInner object itself. + */ + public PoolInner withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { + this.deploymentConfiguration = deploymentConfiguration; + return this; + } + + /** + * Get the currentDedicatedNodes value. + * + * @return the currentDedicatedNodes value + */ + public Integer currentDedicatedNodes() { + return this.currentDedicatedNodes; + } + + /** + * Get the currentLowPriorityNodes value. + * + * @return the currentLowPriorityNodes value + */ + public Integer currentLowPriorityNodes() { + return this.currentLowPriorityNodes; + } + + /** + * Get the scaleSettings value. + * + * @return the scaleSettings value + */ + public ScaleSettings scaleSettings() { + return this.scaleSettings; + } + + /** + * Set the scaleSettings value. + * + * @param scaleSettings the scaleSettings value to set + * @return the PoolInner object itself. + */ + public PoolInner withScaleSettings(ScaleSettings scaleSettings) { + this.scaleSettings = scaleSettings; + return this; + } + + /** + * Get this property is set only if the pool automatically scales, i.e. autoScaleSettings are used. + * + * @return the autoScaleRun value + */ + public AutoScaleRun autoScaleRun() { + return this.autoScaleRun; + } + + /** + * Get this imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. Possible values include: 'Enabled', 'Disabled'. + * + * @return the interNodeCommunication value + */ + public InterNodeCommunicationState interNodeCommunication() { + return this.interNodeCommunication; + } + + /** + * Set this imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. Possible values include: 'Enabled', 'Disabled'. + * + * @param interNodeCommunication the interNodeCommunication value to set + * @return the PoolInner object itself. + */ + public PoolInner withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication) { + this.interNodeCommunication = interNodeCommunication; + return this; + } + + /** + * Get the networkConfiguration value. + * + * @return the networkConfiguration value + */ + public NetworkConfiguration networkConfiguration() { + return this.networkConfiguration; + } + + /** + * Set the networkConfiguration value. + * + * @param networkConfiguration the networkConfiguration value to set + * @return the PoolInner object itself. + */ + public PoolInner withNetworkConfiguration(NetworkConfiguration networkConfiguration) { + this.networkConfiguration = networkConfiguration; + return this; + } + + /** + * Get the maxTasksPerNode value. + * + * @return the maxTasksPerNode value + */ + public Integer maxTasksPerNode() { + return this.maxTasksPerNode; + } + + /** + * Set the maxTasksPerNode value. + * + * @param maxTasksPerNode the maxTasksPerNode value to set + * @return the PoolInner object itself. + */ + public PoolInner withMaxTasksPerNode(Integer maxTasksPerNode) { + this.maxTasksPerNode = maxTasksPerNode; + return this; + } + + /** + * Get the taskSchedulingPolicy value. + * + * @return the taskSchedulingPolicy value + */ + public TaskSchedulingPolicy taskSchedulingPolicy() { + return this.taskSchedulingPolicy; + } + + /** + * Set the taskSchedulingPolicy value. + * + * @param taskSchedulingPolicy the taskSchedulingPolicy value to set + * @return the PoolInner object itself. + */ + public PoolInner withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy) { + this.taskSchedulingPolicy = taskSchedulingPolicy; + return this; + } + + /** + * Get the userAccounts value. + * + * @return the userAccounts value + */ + public List userAccounts() { + return this.userAccounts; + } + + /** + * Set the userAccounts value. + * + * @param userAccounts the userAccounts value to set + * @return the PoolInner object itself. + */ + public PoolInner withUserAccounts(List userAccounts) { + this.userAccounts = userAccounts; + return this; + } + + /** + * Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code. + * + * @return the metadata value + */ + public List metadata() { + return this.metadata; + } + + /** + * Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code. + * + * @param metadata the metadata value to set + * @return the PoolInner object itself. + */ + public PoolInner withMetadata(List metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get in an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. + * + * @return the startTask value + */ + public StartTask startTask() { + return this.startTask; + } + + /** + * Set in an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. + * + * @param startTask the startTask value to set + * @return the PoolInner object itself. + */ + public PoolInner withStartTask(StartTask startTask) { + this.startTask = startTask; + return this; + } + + /** + * Get for Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + * + * @return the certificates value + */ + public List certificates() { + return this.certificates; + } + + /** + * Set for Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + * + * @param certificates the certificates value to set + * @return the PoolInner object itself. + */ + public PoolInner withCertificates(List certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get changes to application packages affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. + * + * @return the applicationPackages value + */ + public List applicationPackages() { + return this.applicationPackages; + } + + /** + * Set changes to application packages affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. + * + * @param applicationPackages the applicationPackages value to set + * @return the PoolInner object itself. + */ + public PoolInner withApplicationPackages(List applicationPackages) { + this.applicationPackages = applicationPackages; + return this; + } + + /** + * Get the list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. + * + * @return the applicationLicenses value + */ + public List applicationLicenses() { + return this.applicationLicenses; + } + + /** + * Set the list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. + * + * @param applicationLicenses the applicationLicenses value to set + * @return the PoolInner object itself. + */ + public PoolInner withApplicationLicenses(List applicationLicenses) { + this.applicationLicenses = applicationLicenses; + return this; + } + + /** + * Get the resizeOperationStatus value. + * + * @return the resizeOperationStatus value + */ + public ResizeOperationStatus resizeOperationStatus() { + return this.resizeOperationStatus; + } + + /** + * Get the ETag of the resource, used for concurrency statements. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsImpl.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsImpl.java new file mode 100644 index 000000000000..2d614ee4b758 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.batch.v2017_09_01.Pools; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.batch.v2017_09_01.Pool; + +class PoolsImpl extends WrapperImpl implements Pools { + private final BatchManager manager; + + PoolsImpl(BatchManager manager) { + super(manager.inner().pools()); + this.manager = manager; + } + + public BatchManager manager() { + return this.manager; + } + + @Override + public PoolImpl define(String name) { + return wrapModel(name); + } + + private PoolImpl wrapModel(PoolInner inner) { + return new PoolImpl(inner, manager()); + } + + private PoolImpl wrapModel(String name) { + return new PoolImpl(name, this.manager()); + } + + @Override + public Observable disableAutoScaleAsync(String resourceGroupName, String accountName, String poolName) { + PoolsInner client = this.inner(); + return client.disableAutoScaleAsync(resourceGroupName, accountName, poolName) + .map(new Func1() { + @Override + public Pool call(PoolInner inner) { + return new PoolImpl(inner, manager()); + } + }); + } + + @Override + public Observable stopResizeAsync(String resourceGroupName, String accountName, String poolName) { + PoolsInner client = this.inner(); + return client.stopResizeAsync(resourceGroupName, accountName, poolName) + .map(new Func1() { + @Override + public Pool call(PoolInner inner) { + return new PoolImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByBatchAccountAsync(final String resourceGroupName, final String accountName) { + PoolsInner client = this.inner(); + return client.listByBatchAccountAsync(resourceGroupName, accountName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Pool call(PoolInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName, String poolName) { + PoolsInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName, poolName) + .map(new Func1() { + @Override + public Pool call(PoolInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName, String poolName) { + PoolsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName, poolName).toCompletable(); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsInner.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsInner.java new file mode 100644 index 000000000000..52d1d1676b59 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/PoolsInner.java @@ -0,0 +1,1572 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.batch.v2017_09_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.batch.v2017_09_01.PoolCreateHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.PoolDeleteHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.PoolDisableAutoScaleHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.PoolGetHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.PoolStopResizeHeaders; +import com.microsoft.azure.management.batch.v2017_09_01.PoolUpdateHeaders; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Pools. + */ +public class PoolsInner { + /** The Retrofit service to perform REST calls. */ + private PoolsService service; + /** The service client containing this operation class. */ + private BatchManagementClientImpl client; + + /** + * Initializes an instance of PoolsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PoolsInner(Retrofit retrofit, BatchManagementClientImpl client) { + this.service = retrofit.create(PoolsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Pools to be + * used by Retrofit to perform actually REST calls. + */ + interface PoolsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools listByBatchAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools") + Observable> listByBatchAccount(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("maxresults") Integer maxresults, @Query("$select") String select, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Body PoolInner parameters, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Body PoolInner parameters, @Header("If-Match") String ifMatch, @Header("If-None-Match") String ifNoneMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Body PoolInner parameters, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools disableAutoScale" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale") + Observable> disableAutoScale(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools stopResize" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize") + Observable> stopResize(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("poolName") String poolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.v2017_09_01.Pools listByBatchAccountNext" }) + @GET + Observable> listByBatchAccountNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PoolInner> object if successful. + */ + public PagedList listByBatchAccount(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listByBatchAccountSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable> listByBatchAccountAsync(final String resourceGroupName, final String accountName) { + return listByBatchAccountWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable>> listByBatchAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listByBatchAccountSinglePageAsync(resourceGroupName, accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountSinglePageAsync(final String resourceGroupName, final String accountName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer maxresults = null; + final String select = null; + final String filter = null; + return service.listByBatchAccount(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, select, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PoolInner> object if successful. + */ + public PagedList listByBatchAccount(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + ServiceResponse> response = listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable> listByBatchAccountAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + return listByBatchAccountWithServiceResponseAsync(resourceGroupName, accountName, maxresults, select, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable>> listByBatchAccountWithServiceResponseAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + return listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account. + ServiceResponse> * @param accountName The name of the Batch account. + ServiceResponse> * @param maxresults The maximum number of items to return in the response. + ServiceResponse> * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. + ServiceResponse> * @param filter OData filter expression. Valid properties for filtering are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountSinglePageAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final String select, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByBatchAccount(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, select, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByBatchAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner create(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).toBlocking().last().body(); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters), serviceCallback); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + final String ifNoneMatch = null; + Observable> observable = service.create(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), PoolCreateHeaders.class); + } + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner create(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + return createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch).toBlocking().last().body(); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch), serviceCallback); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + return createWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.create(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), PoolCreateHeaders.class); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner beginCreate(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).toBlocking().single().body(); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters), serviceCallback); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + final String ifNoneMatch = null; + return service.beginCreate(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner beginCreate(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch).toBlocking().single().body(); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch), serviceCallback); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates a new pool inside the specified account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. + * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreate(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, ifNoneMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolCreateHeaders.class); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner update(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).toBlocking().single().body(); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters), serviceCallback); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + final String ifMatch = null; + return service.update(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner update(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch).toBlocking().single().body(); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch), serviceCallback); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable updateAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Updates the properties of an existing pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. + * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(resourceGroupName, accountName, poolName, this.client.subscriptionId(), parameters, ifMatch, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolUpdateHeaders.class); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName, String poolName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName, poolName).toBlocking().last().body(); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String poolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, poolName), serviceCallback); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName, String poolName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName, poolName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, accountName, poolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), PoolDeleteHeaders.class); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String accountName, String poolName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, poolName).toBlocking().single().body(); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String accountName, String poolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, poolName), serviceCallback); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName, String poolName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, poolName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, accountName, poolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolDeleteHeaders.class); + } + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner get(String resourceGroupName, String accountName, String poolName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, poolName).toBlocking().single().body(); + } + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String accountName, String poolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, accountName, poolName), serviceCallback); + } + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable getAsync(String resourceGroupName, String accountName, String poolName) { + return getWithServiceResponseAsync(resourceGroupName, accountName, poolName).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, accountName, poolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolGetHeaders.class); + } + + /** + * Disables automatic scaling for a pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner disableAutoScale(String resourceGroupName, String accountName, String poolName) { + return disableAutoScaleWithServiceResponseAsync(resourceGroupName, accountName, poolName).toBlocking().single().body(); + } + + /** + * Disables automatic scaling for a pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture disableAutoScaleAsync(String resourceGroupName, String accountName, String poolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(disableAutoScaleWithServiceResponseAsync(resourceGroupName, accountName, poolName), serviceCallback); + } + + /** + * Disables automatic scaling for a pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable disableAutoScaleAsync(String resourceGroupName, String accountName, String poolName) { + return disableAutoScaleWithServiceResponseAsync(resourceGroupName, accountName, poolName).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Disables automatic scaling for a pool. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> disableAutoScaleWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableAutoScale(resourceGroupName, accountName, poolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = disableAutoScaleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders disableAutoScaleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolDisableAutoScaleHeaders.class); + } + + /** + * Stops an ongoing resize operation on the pool. + * This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PoolInner object if successful. + */ + public PoolInner stopResize(String resourceGroupName, String accountName, String poolName) { + return stopResizeWithServiceResponseAsync(resourceGroupName, accountName, poolName).toBlocking().single().body(); + } + + /** + * Stops an ongoing resize operation on the pool. + * This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopResizeAsync(String resourceGroupName, String accountName, String poolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(stopResizeWithServiceResponseAsync(resourceGroupName, accountName, poolName), serviceCallback); + } + + /** + * Stops an ongoing resize operation on the pool. + * This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable stopResizeAsync(String resourceGroupName, String accountName, String poolName) { + return stopResizeWithServiceResponseAsync(resourceGroupName, accountName, poolName).map(new Func1, PoolInner>() { + @Override + public PoolInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Stops an ongoing resize operation on the pool. + * This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PoolInner object + */ + public Observable> stopResizeWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (poolName == null) { + throw new IllegalArgumentException("Parameter poolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopResize(resourceGroupName, accountName, poolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = stopResizeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders stopResizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, PoolStopResizeHeaders.class); + } + + /** + * Lists all of the pools in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PoolInner> object if successful. + */ + public PagedList listByBatchAccountNext(final String nextPageLink) { + ServiceResponse> response = listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the pools in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByBatchAccountNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByBatchAccountNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the pools in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable> listByBatchAccountNextAsync(final String nextPageLink) { + return listByBatchAccountNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PoolInner> object + */ + public Observable>> listByBatchAccountNextWithServiceResponseAsync(final String nextPageLink) { + return listByBatchAccountNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByBatchAccountNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all of the pools in the specified account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PoolInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByBatchAccountNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByBatchAccountNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByBatchAccountNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByBatchAccountNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/package-info.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/package-info.java new file mode 100644 index 000000000000..8e0e50942755 --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/implementation/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for BatchManagementClient. + */ +package com.microsoft.azure.management.batch.v2017_09_01.implementation; diff --git a/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/package-info.java b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/package-info.java new file mode 100644 index 000000000000..1c3f0185041b --- /dev/null +++ b/batch/resource-manager/v2017_09_01/src/main/java/com/microsoft/azure/management/batch/v2017_09_01/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for BatchManagementClient. + */ +package com.microsoft.azure.management.batch.v2017_09_01; diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 665ff6a1cb4e..3ae4c9aa409d 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -64,8 +64,8 @@ known_content_issues: - ['sdk/keyvault/README.md', '#3113'] - ['sdk/loganalytics/microsoft-azure-loganalytics/README.md', '#3113'] - ['sdk/servicebus/README.md', '#3113'] - - ['storage/data-plane/README.md', '#3113'] - - ['storage/data-plane/swagger/README.md', '#3113'] + - ['sdk/storage/microsoft-azure-storage-blob/README.md', '#3113'] + - ['sdk/storage/microsoft-azure-storage-blob/swagger/README.md', '#3113'] - ['sdk/core/README.md', '#3113'] - ['cosmosdb/data-plane/README.md', '#3113'] - ['cosmosdb/data-plane/benchmark/README.md', '#3113'] diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java index b36f28e10be8..44522a4e8597 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java @@ -21,9 +21,7 @@ * No external dependency exposed in public API */ public class ExternalDependencyExposedCheck extends AbstractCheck { - private static final String EXTERNAL_DEPENDENCY_ERROR = - "Class ''%s'', is a class from external dependency. You should not use it as a return or method argument type."; - + private static final String EXTERNAL_DEPENDENCY_ERROR = "Class ''%s'', is a class from external dependency. You should not use it as a %s type."; private static final Set VALID_DEPENDENCY_SET = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( "java", "com.azure", "reactor", "io.netty.buffer.ByteBuf" ))); @@ -51,6 +49,7 @@ public int[] getAcceptableTokens() { public int[] getRequiredTokens() { return new int[] { TokenTypes.IMPORT, + TokenTypes.CLASS_DEF, TokenTypes.METHOD_DEF }; } @@ -68,7 +67,7 @@ public void visitToken(DetailAST token) { // CLASS_DEF always has MODIFIERS final AccessModifier accessModifier = CheckUtil.getAccessModifierFromModifiersToken( token.findFirstToken(TokenTypes.MODIFIERS)); - isPublicClass = accessModifier.equals(AccessModifier.PUBLIC); + isPublicClass = accessModifier.equals(AccessModifier.PUBLIC) || accessModifier.equals(AccessModifier.PROTECTED); break; case TokenTypes.METHOD_DEF: if (!isPublicClass) { @@ -101,14 +100,14 @@ private void checkNoExternalDependencyExposed(DetailAST methodDefToken) { final DetailAST typeToken = methodDefToken.findFirstToken(TokenTypes.TYPE); if (typeToken != null) { getInvalidReturnTypes(typeToken).forEach( - (token, returnTypeName) -> log(token, String.format(EXTERNAL_DEPENDENCY_ERROR, returnTypeName))); + (token, returnTypeName) -> log(token, String.format(EXTERNAL_DEPENDENCY_ERROR, returnTypeName, "return"))); } // Checks for the parameters of the method final DetailAST parametersToken = methodDefToken.findFirstToken(TokenTypes.PARAMETERS); if (parametersToken != null) { getInvalidParameterTypes(parametersToken).forEach( - (token, returnTypeName) -> log(token, String.format(EXTERNAL_DEPENDENCY_ERROR, returnTypeName))); + (token, parameterTypeName) -> log(token, String.format(EXTERNAL_DEPENDENCY_ERROR, parameterTypeName, "method argument"))); } } @@ -134,7 +133,7 @@ private Map getInvalidReturnTypes(DetailAST typeToken) { // TYPE_ARGUMENTS, add all invalid external types to the map final DetailAST typeArgumentsToken = typeToken.findFirstToken(TokenTypes.TYPE_ARGUMENTS); if (typeArgumentsToken != null) { - invalidReturnTypeMap.putAll(getInvalidTypeFromTypeArguments(typeArgumentsToken)); + getInvalidParameterType(typeArgumentsToken, invalidReturnTypeMap); } return invalidReturnTypeMap; @@ -150,61 +149,42 @@ private Map getInvalidParameterTypes(DetailAST parametersType final Map invalidParameterTypesMap = new HashMap<>(); for (DetailAST ast = parametersTypeToken.getFirstChild(); ast != null; ast = ast.getNextSibling()) { if (ast.getType() == TokenTypes.PARAMETER_DEF) { - invalidParameterTypesMap.putAll(getInvalidTypeFromTypeArguments(ast.findFirstToken(TokenTypes.TYPE))); + getInvalidParameterType(ast.findFirstToken(TokenTypes.TYPE), invalidParameterTypesMap); } } return invalidParameterTypesMap; } /** - * A helper function that checks TYPE AST node. Since both return type and input parameter argument type has - * TYPE AST node under. This function applied to both. + * Get all invalid AST nodes from a given token. DFS tree traversal used to find all invalid nodes. * - * @param typeArgumentsToken TYPE_ARGUMENTS AST node - * @return a map that maps all the invalid TYPE_ARGUMENT node and the type name + * @param token TYPE_ARGUMENT, TYPE_ARGUMENTS or TYPE AST node + * @return a map that maps all the invalid node and the type name */ - private Map getInvalidTypeFromTypeArguments(DetailAST typeArgumentsToken) { - final Map invalidTypesMap = new HashMap<>(); - if (typeArgumentsToken == null) { + private Map getInvalidParameterType(DetailAST token, Map invalidTypesMap) { + if (token == null) { return invalidTypesMap; } - // Checks multiple type arguments - for (DetailAST ast = typeArgumentsToken.getFirstChild(); ast != null; ast = ast.getNextSibling()) { - if (ast.getType() != TokenTypes.TYPE_ARGUMENT) { - continue; - } - final String invalidTypeName = getInvalidTypeNameFromTypeArgument(ast); - if (invalidTypeName != null) { - invalidTypesMap.put(ast, invalidTypeName); + for (DetailAST ast = token.getFirstChild(); ast != null; ast = ast.getNextSibling()) { + final int tokenType = ast.getType(); + if (tokenType == TokenTypes.IDENT) { + final String identName = ast.getText(); + if (!isValidClassDependency(identName)) { + invalidTypesMap.put(ast, identName); + } + } else if (tokenType == TokenTypes.TYPE_ARGUMENT || tokenType == TokenTypes.TYPE_ARGUMENTS) { + getInvalidParameterType(ast, invalidTypesMap); } } return invalidTypesMap; } - /** - * Get invalid type name from TYPE_ARGUMENT - * - * @param typeArgumentToken TYPE_ARGUMENT AST node - * @return an invalid type name if it is an invalid library. Otherwise, returns null. - */ - private String getInvalidTypeNameFromTypeArgument(DetailAST typeArgumentToken) { - final DetailAST identToken = typeArgumentToken.findFirstToken(TokenTypes.IDENT); - // if there is no IDENT token, implies the token is default java types. - if (identToken == null) { - return null; - } - - final String typeName = identToken.getText(); - // if not exist in the classPathMap, that implies the type is java default types, such as int. - return isValidClassDependency(typeName) ? null : typeName; - } - /** * A helper function that checks for whether a class is from a valid internal dependency or is a suppression class * * @param typeName the type name of class - * @return true if the class is a suppression class, otherwise, return false. + * @return true if the class is a suppression class, otherwise, return false. */ private boolean isValidClassDependency(String typeName) { // If the qualified class name does not exist in the map, diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index 27d8784c5efd..f7675dbe9b2f 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -94,11 +94,20 @@ - - - - - + + + + + + + + + + + + + + diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index b4bb26844c52..752193f7567d 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -347,7 +347,7 @@ - + @@ -450,7 +450,7 @@ - + diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index cee087f22d29..022f981e8725 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -32,7 +32,8 @@ 4.0.0-preview.1 5.0.0-preview.2 12.0.0-preview.1 - 12.0.0-preview.1 + 12.0.0-preview.2 + 12.0.0-preview.2 @@ -94,6 +95,11 @@ + + com.azure + azure-storage-file + ${azure-storage-file.version} + com.azure azure-storage-queue diff --git a/eng/pipelines/client.yml b/eng/pipelines/client.yml index 12c08140c139..a3622032f797 100644 --- a/eng/pipelines/client.yml +++ b/eng/pipelines/client.yml @@ -109,7 +109,7 @@ jobs: jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'spotbugs:spotbugs checkstyle:checkstyle' + goals: 'spotbugs:spotbugs checkstyle:checkstyle-aggregate' # Generate the Maven site report, including SpotBugs, JavaDoc, CheckStyle, Jacoco, etc only when we are not # running as a PR check. diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 68949203610d..e8cfa1bf2ac0 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -104,7 +104,7 @@ jobs: jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'spotbugs:spotbugs checkstyle:checkstyle' + goals: 'spotbugs:spotbugs checkstyle:checkstyle-aggregate' # Generate the Maven site report, including SpotBugs, JavaDoc, CheckStyle, Jacoco, etc only when we are not # running as a PR check. diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index 7e86db80baad..aa3e5dc764da 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -30,8 +30,8 @@ 4.0.0-preview.1 5.0.0-preview.2 12.0.0-preview.1 - 12.0.0-preview.1 - 12.0.0-preview.1 + 12.0.0-preview.2 + 12.0.0-preview.2 diff --git a/pom.client.xml b/pom.client.xml index ed51d0abaa3d..1e57f3495116 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -545,7 +545,8 @@ -snippetpath ${project.basedir}/sdk/eventhubs/azure-eventhubs/src/samples/java -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-keys/src/samples/java -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-secrets/src/samples/java - + -snippetpath ${project.basedir}/storage/client/blob/src/samples/java + -snippetpath ${project.basedir}/storage/client/file/src/samples/java -snippetpath ${project.basedir}/storage/client/queue/src/samples/java @@ -744,8 +745,8 @@ ./sdk/identity/azure-identity - ./storage/client/blob - ./storage/client/file - ./storage/client/queue + ./sdk/storage/azure-storage-blob + ./sdk/storage/azure-storage-file + ./sdk/storage/azure-storage-queue diff --git a/pom.data.xml b/pom.data.xml index 9269fd2c2a0c..2afba64d5be2 100644 --- a/pom.data.xml +++ b/pom.data.xml @@ -546,6 +546,6 @@ ./sdk/eventhubs/pom.data.xml ./sdk/keyvault/pom.data.xml ./sdk/servicebus - ./storage/data-plane + ./sdk/storage/microsoft-azure-storage-blob diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java index 8066edbd9b85..7a5c36bb2418 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java @@ -625,27 +625,10 @@ Mono> listSettingRevisionsNextPage(String ne return result; } - Flux listSettingRevisions(SettingSelector selector, Context context) { - Mono> result; - - if (selector != null) { - String fields = ImplUtils.arrayToString(selector.fields(), SettingFields::toStringMapper); - String keys = ImplUtils.arrayToString(selector.keys(), key -> key); - String labels = ImplUtils.arrayToString(selector.labels(), label -> label); - String range = selector.range() != null ? String.format(RANGE_QUERY, selector.range()) : null; - - result = service.listKeyValueRevisions(serviceEndpoint, keys, labels, fields, selector.acceptDateTime(), range, context) - .doOnRequest(ignoredValue -> logger.info("Listing ConfigurationSetting revisions - {}", selector)) - .doOnSuccess(response -> logger.info("Listed ConfigurationSetting revisions - {}", selector)) - .doOnError(error -> logger.warning("Failed to list ConfigurationSetting revisions - {}", selector, error)); - } else { - result = service.listKeyValueRevisions(serviceEndpoint, null, null, null, null, null, context) - .doOnRequest(ignoredValue -> logger.info("Listing ConfigurationSetting revisions")) - .doOnSuccess(response -> logger.info("Listed ConfigurationSetting revisions")) - .doOnError(error -> logger.warning("Failed to list all ConfigurationSetting revisions", error)); - } - - return result.flatMapMany(r -> extractAndFetchConfigurationSettings(r, context)); + PagedFlux listSettingRevisions(SettingSelector selector, Context context) { + return new PagedFlux<>(() -> + listSettingRevisionsFirstPage(selector, context), + continuationToken -> listSettingRevisionsNextPage(continuationToken, context)); } private Flux listSettings(String nextPageLink, Context context) { diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java index 693bb40e44b6..33337dcb5734 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java @@ -3,6 +3,7 @@ package com.azure.data.appconfiguration; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.implementation.annotation.ReturnType; import com.azure.core.implementation.annotation.ServiceClient; import com.azure.core.implementation.annotation.ServiceMethod; @@ -15,7 +16,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; - /** * This class provides a client that contains all the operations for {@link ConfigurationSetting ConfigurationSettings} * in Azure App Configuration Store. Operations allowed by the client are adding, retrieving, updating, and deleting @@ -447,14 +447,14 @@ private Response deleteSetting(ConfigurationSetting settin * *

Retrieve all settings that use the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector} * * @param options Optional. Options to filter configuration setting results from the service. - * @return A List of ConfigurationSettings that matches the {@code options}. If no options were provided, the List + * @return A {@link PagedIterable} of ConfigurationSettings that matches the {@code options}. If no options were provided, the List * contains all of the current settings in the service. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public Iterable listSettings(SettingSelector options) { + public PagedIterable listSettings(SettingSelector options) { return listSettings(options, Context.NONE); } @@ -466,16 +466,16 @@ public Iterable listSettings(SettingSelector options) { * *

Retrieve all settings that use the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector-Context} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector-context} * * @param options Optional. Options to filter configuration setting results from the service. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A List of ConfigurationSettings that matches the {@code options}. If no options were provided, the List + * @return A {@link PagedIterable} of ConfigurationSettings that matches the {@code options}. If no options were provided, the {@link PagedIterable} * contains all of the current settings in the service. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public Iterable listSettings(SettingSelector options, Context context) { - return client.listSettings(options, context).collectList().block(); + public PagedIterable listSettings(SettingSelector options, Context context) { + return new PagedIterable<>(client.listSettings(options, context)); } /** @@ -490,13 +490,13 @@ public Iterable listSettings(SettingSelector options, Cont * *

Retrieve all revisions of the setting that has the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector} * * @param selector Optional. Used to filter configuration setting revisions from the service. - * @return Revisions of the ConfigurationSetting + * @return {@link PagedIterable} of {@link ConfigurationSetting} revisions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public Iterable listSettingRevisions(SettingSelector selector) { + public PagedIterable listSettingRevisions(SettingSelector selector) { return listSettingRevisions(selector, Context.NONE); } @@ -512,14 +512,14 @@ public Iterable listSettingRevisions(SettingSelector selec * *

Retrieve all revisions of the setting that has the key "prodDBConnection".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector-Context} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector-context} * * @param selector Optional. Used to filter configuration setting revisions from the service. * @param context Additional context that is passed through the Http pipeline during the service call. - * @return Revisions of the ConfigurationSetting + * @return {@link PagedIterable} of {@link ConfigurationSetting} revisions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public Iterable listSettingRevisions(SettingSelector selector, Context context) { - return client.listSettingRevisions(selector, context).collectList().block(); + public PagedIterable listSettingRevisions(SettingSelector selector, Context context) { + return new PagedIterable<>(client.listSettingRevisions(selector, context)); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java index 95841f719962..379cce877425 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java @@ -275,45 +275,57 @@ public void deleteSetting() { */ public void listSettings() { ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector - for (ConfigurationSetting setting : configurationClient.listSettings(new SettingSelector() - .keys("prodDBConnection"))) { + // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector + SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); + configurationClient.listSettings(settingSelector).forEach(setting -> { System.out.printf("Key: %s, Value: %s", setting.key(), setting.value()); - } - // END: com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector + }); + // END: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector + } - /** - * Generates code sample for using {@link ConfigurationClient#listSettings(SettingSelector, Context)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector-Context - for (ConfigurationSetting setting : configurationClient.listSettings(new SettingSelector() - .keys("prodDBConnection"), new Context(key1, value1))) { + /** + * Generates code sample for using {@link ConfigurationClient#listSettings(SettingSelector, Context)} + */ + public void listSettingsContext() { + ConfigurationClient configurationClient = createSyncConfigurationClient(); + // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector-context + SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); + Context ctx = new Context(key2, value2); + configurationClient.listSettings(settingSelector, ctx).forEach(setting -> { System.out.printf("Key: %s, Value: %s", setting.key(), setting.value()); - } - // END: com.azure.data.applicationconfig.configurationclient.listSettings#SettingSelector-Context + }); + // END: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector-context } /** * Generates code sample for using {@link ConfigurationClient#listSettingRevisions(SettingSelector)} */ public void listSettingRevisions() { - ConfigurationClient configurationClient = createSyncConfigurationClient(); - // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector - for (ConfigurationSetting revision : configurationClient.listSettingRevisions(new SettingSelector() - .keys("prodDBConnection"))) { - System.out.printf("Key: %s, Value: %s", revision.key(), revision.value()); - } - // END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector + ConfigurationClient client = createSyncConfigurationClient(); + // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector + SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); + client.listSettingRevisions(settingSelector).streamByPage().forEach(resp -> { + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.headers(), + resp.request().url(), resp.statusCode()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d %n", value); + }); + }); + // END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector + } - /** - * Generates code sample for using {@link ConfigurationClient#listSettingRevisions(SettingSelector, Context)} - */ - // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector-Context - for (ConfigurationSetting revision : configurationClient.listSettingRevisions(new SettingSelector() - .keys("prodDBConnection"), new Context(key2, value2))) { - System.out.printf("Key: %s, Value: %s", revision.key(), revision.value()); - } - // END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#SettingSelector-Context + /** + * Generates code sample for using {@link ConfigurationClient#listSettingRevisions(SettingSelector, Context)} + */ + public void listSettingRevisionsContext() { + ConfigurationClient configurationClient = createSyncConfigurationClient(); + // BEGIN: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector-context + SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); + Context ctx = new Context(key2, value2); + configurationClient.listSettingRevisions(settingSelector, ctx).forEach(setting -> { + System.out.printf("Key: %s, Value: %s", setting.key(), setting.value()); + }); + // END: com.azure.data.applicationconfig.configurationclient.listSettingRevisions#settingSelector-context } /** diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java index a8ccda088e76..8b29dc51d313 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java @@ -7,6 +7,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.Response; import com.azure.core.util.logging.ClientLogger; import com.azure.data.appconfiguration.models.ConfigurationSetting; @@ -36,18 +37,18 @@ protected void beforeTest() { if (interceptorManager.isPlaybackMode()) { client = clientSetup(credentials -> new ConfigurationClientBuilder() - .credential(credentials) - .httpClient(interceptorManager.getPlaybackClient()) - .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) - .buildAsyncClient()); + .credential(credentials) + .httpClient(interceptorManager.getPlaybackClient()) + .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) + .buildAsyncClient()); } else { client = clientSetup(credentials -> new ConfigurationClientBuilder() - .credential(credentials) - .httpClient(HttpClient.createDefault().wiretap(true)) - .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) - .addPolicy(interceptorManager.getRecordPolicy()) - .addPolicy(new RetryPolicy()) - .buildAsyncClient()); + .credential(credentials) + .httpClient(HttpClient.createDefault().wiretap(true)) + .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) + .addPolicy(interceptorManager.getRecordPolicy()) + .addPolicy(new RetryPolicy()) + .buildAsyncClient()); } } @@ -55,11 +56,11 @@ protected void beforeTest() { protected void afterTest() { logger.info("Cleaning up created key values."); client.listSettings(new SettingSelector().keys(keyPrefix + "*")) - .flatMap(configurationSetting -> { - logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.key(), configurationSetting.label(), configurationSetting.isLocked()); - return client.deleteSetting(configurationSetting); - }) - .blockLast(); + .flatMap(configurationSetting -> { + logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.key(), configurationSetting.label(), configurationSetting.isLocked()); + return client.deleteSetting(configurationSetting); + }) + .blockLast(); logger.info("Finished cleaning up values."); } @@ -121,8 +122,8 @@ public void addExistingSetting() { public void setSetting() { setSettingRunner((expected, update) -> StepVerifier.create(client.setSetting(expected)) - .assertNext(response -> assertConfigurationEquals(expected, response)) - .verifyComplete()); + .assertNext(response -> assertConfigurationEquals(expected, response)) + .verifyComplete()); } /** @@ -134,20 +135,20 @@ public void setSettingIfEtag() { setSettingIfEtagRunner((initial, update) -> { // This etag is not the correct format. It is not the correct hash that the service is expecting. StepVerifier.create(client.setSetting(initial.etag("badEtag"))) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code())); + .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code())); final String etag = client.addSetting(initial).block().etag(); StepVerifier.create(client.setSetting(update.etag(etag))) - .assertNext(response -> assertConfigurationEquals(update, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(update, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(initial)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code())); + .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code())); StepVerifier.create(client.getSetting(update)) - .assertNext(response -> assertConfigurationEquals(update, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(update, response)) + .verifyComplete(); }); } @@ -190,7 +191,7 @@ public void setSettingNullKey() { public void updateNoExistingSetting() { updateNoExistingSettingRunner((expected) -> StepVerifier.create(client.updateSetting(expected)) - .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code()))); + .verifyErrorSatisfies(ex -> assertRestException(ex, ResourceNotFoundException.class, HttpResponseStatus.PRECONDITION_FAILED.code()))); } /** @@ -200,8 +201,8 @@ public void updateNoExistingSetting() { public void updateSetting() { updateSettingRunner((initial, update) -> StepVerifier.create(client.addSetting(initial)) - .assertNext(response -> assertConfigurationEquals(initial, response)) - .verifyComplete()); + .assertNext(response -> assertConfigurationEquals(initial, response)) + .verifyComplete()); } /** @@ -483,14 +484,14 @@ public void listSettingsAcceptDateTime() { // Create 3 revisions of the same key. StepVerifier.create(client.setSetting(original)) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(original, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated).delayElement(Duration.ofSeconds(2))) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated2)) - .assertNext(response -> assertConfigurationEquals(updated2, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated2, response)) + .verifyComplete(); // Gets all versions of this value so we can get the one we want at that particular date. List revisions = client.listSettingRevisions(new SettingSelector().keys(keyName)).collectList().block(); @@ -501,8 +502,8 @@ public void listSettingsAcceptDateTime() { // We want to fetch the configuration setting when we first updated its value. SettingSelector options = new SettingSelector().keys(keyName).acceptDatetime(revisions.get(1).lastModified()); StepVerifier.create(client.listSettings(options)) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated, response)) + .verifyComplete(); } /** @@ -517,28 +518,28 @@ public void listRevisions() { // Create 3 revisions of the same key. StepVerifier.create(client.setSetting(original)) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(original, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated)) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated2)) - .assertNext(response -> assertConfigurationEquals(updated2, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated2, response)) + .verifyComplete(); // Get all revisions for a key, they are listed in descending order. StepVerifier.create(client.listSettingRevisions(new SettingSelector().keys(keyName))) - .assertNext(response -> assertConfigurationEquals(updated2, response)) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated2, response)) + .assertNext(response -> assertConfigurationEquals(updated, response)) + .assertNext(response -> assertConfigurationEquals(original, response)) + .verifyComplete(); // Verifies that we can select specific fields. StepVerifier.create(client.listSettingRevisions(new SettingSelector().keys(keyName).fields(SettingFields.KEY, SettingFields.ETAG))) - .assertNext(response -> validateListRevisions(updated2, response)) - .assertNext(response -> validateListRevisions(updated, response)) - .assertNext(response -> validateListRevisions(original, response)) - .verifyComplete(); + .assertNext(response -> validateListRevisions(updated2, response)) + .assertNext(response -> validateListRevisions(updated, response)) + .assertNext(response -> validateListRevisions(original, response)) + .verifyComplete(); } /** @@ -669,14 +670,14 @@ public void listRevisionsAcceptDateTime() { // Create 3 revisions of the same key. StepVerifier.create(client.setSetting(original)) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(original, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated).delayElement(Duration.ofSeconds(2))) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated, response)) + .verifyComplete(); StepVerifier.create(client.setSetting(updated2)) - .assertNext(response -> assertConfigurationEquals(updated2, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated2, response)) + .verifyComplete(); // Gets all versions of this value. List revisions = client.listSettingRevisions(new SettingSelector().keys(keyName)).collectList().block(); @@ -688,9 +689,9 @@ public void listRevisionsAcceptDateTime() { // Revisions are returned in descending order from creation date. SettingSelector options = new SettingSelector().keys(keyName).acceptDatetime(revisions.get(1).lastModified()); StepVerifier.create(client.listSettingRevisions(options)) - .assertNext(response -> assertConfigurationEquals(updated, response)) - .assertNext(response -> assertConfigurationEquals(original, response)) - .verifyComplete(); + .assertNext(response -> assertConfigurationEquals(updated, response)) + .assertNext(response -> assertConfigurationEquals(original, response)) + .verifyComplete(); } /** @@ -717,6 +718,63 @@ public void listRevisionsWithPagination() { .verifyComplete(); } + /** + * Verifies that, given a ton of revisions, we can list the revisions ConfigurationSettings using pagination and stream is invoked multiple times. + * (ie. where 'nextLink' has a URL pointing to the next page of results.) + */ + public void listRevisionsWithPaginationAndRepeatStream() { + final int numberExpected = 50; + List settings = new ArrayList<>(numberExpected); + List>> results = new ArrayList<>(); + for (int value = 0; value < numberExpected; value++) { + ConfigurationSetting setting = new ConfigurationSetting().key(keyPrefix).value("myValue" + value).label(labelPrefix); + settings.add(setting); + results.add(client.setSettingWithResponse(setting)); + } + + SettingSelector filter = new SettingSelector().keys(keyPrefix).labels(labelPrefix); + + Flux.merge(results).blockLast(); + + List configurationSettingList1 = new ArrayList<>(); + List configurationSettingList2 = new ArrayList<>(); + + PagedFlux configurationSettingPagedFlux = client.listSettingRevisions(filter); + configurationSettingPagedFlux.toStream().forEach(configurationSetting -> configurationSettingList1.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList1.size()); + + configurationSettingPagedFlux.toStream().forEach(configurationSetting -> configurationSettingList2.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList2.size()); + } + + /** + * Verifies that, given a ton of revisions, we can list the revisions ConfigurationSettings using pagination and stream is invoked multiple times. + * (ie. where 'nextLink' has a URL pointing to the next page of results.) + */ + public void listRevisionsWithPaginationAndRepeatIterator() { + final int numberExpected = 50; + List settings = new ArrayList<>(numberExpected); + List>> results = new ArrayList<>(); + for (int value = 0; value < numberExpected; value++) { + ConfigurationSetting setting = new ConfigurationSetting().key(keyPrefix).value("myValue" + value).label(labelPrefix); + settings.add(setting); + results.add(client.setSettingWithResponse(setting)); + } + + SettingSelector filter = new SettingSelector().keys(keyPrefix).labels(labelPrefix); + + Flux.merge(results).blockLast(); + + List configurationSettingList1 = new ArrayList<>(); + List configurationSettingList2 = new ArrayList<>(); + + PagedFlux configurationSettingPagedFlux = client.listSettingRevisions(filter); + configurationSettingPagedFlux.toIterable().forEach(configurationSetting -> configurationSettingList1.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList1.size()); + + configurationSettingPagedFlux.toIterable().forEach(configurationSetting -> configurationSettingList2.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList2.size()); + } /** * Verifies that, given a ton of existing settings, we can list the ConfigurationSettings using pagination * (ie. where 'nextLink' has a URL pointing to the next page of results. diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java index e016ed6c1e97..1f243bb73ec2 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java @@ -2,23 +2,28 @@ // Licensed under the MIT License. package com.azure.data.appconfiguration; +import com.azure.data.appconfiguration.models.ConfigurationSetting; +import com.azure.data.appconfiguration.models.Range; +import com.azure.data.appconfiguration.models.SettingFields; +import com.azure.data.appconfiguration.models.SettingSelector; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.HttpClient; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.data.appconfiguration.models.ConfigurationSetting; -import com.azure.data.appconfiguration.models.Range; -import com.azure.data.appconfiguration.models.SettingFields; -import com.azure.data.appconfiguration.models.SettingSelector; + import io.netty.handler.codec.http.HttpResponseStatus; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; -import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertArrayEquals; public class ConfigurationClientTest extends ConfigurationClientTestBase { private final ClientLogger logger = new ClientLogger(ConfigurationClientTest.class); @@ -49,11 +54,10 @@ protected void beforeTest() { @Override protected void afterTest() { logger.info("Cleaning up created key values."); - - for (ConfigurationSetting configurationSetting : client.listSettings(new SettingSelector().keys(keyPrefix + "*"))) { + client.listSettings(new SettingSelector().keys(keyPrefix + "*")).forEach(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.key(), configurationSetting.label(), configurationSetting.isLocked()); client.deleteSetting(configurationSetting); - } + }); logger.info("Finished cleaning up values."); } @@ -300,6 +304,7 @@ public void deleteSettingNullKey() { * Verifies that a ConfigurationSetting can be added with a label, and that we can fetch that ConfigurationSetting * from the service when filtering by either its label or just its key. */ + public void listWithKeyAndLabel() { final String value = "myValue"; final String key = getKey(); @@ -323,7 +328,7 @@ public void listWithMultipleKeys() { assertConfigurationEquals(setting, client.addSetting(setting)); assertConfigurationEquals(setting2, client.addSetting(setting2)); - return (List) client.listSettings(new SettingSelector().keys(key, key2)); + return client.listSettings(new SettingSelector().keys(key, key2)); }); } @@ -340,7 +345,7 @@ public void listWithMultipleLabels() { assertConfigurationEquals(setting, client.addSetting(setting)); assertConfigurationEquals(setting2, client.addSetting(setting2)); - return (List) client.listSettings(new SettingSelector().keys(key).labels(label, label2)); + return client.listSettings(new SettingSelector().keys(key).labels(label, label2)); }); } @@ -350,7 +355,7 @@ public void listWithMultipleLabels() { public void listSettingsSelectFields() { listSettingsSelectFieldsRunner((settings, selector) -> { settings.forEach(client::setSetting); - return (List) client.listSettings(selector); + return client.listSettings(selector); }); } @@ -375,14 +380,14 @@ public void listSettingsAcceptDateTime() { } // Gets all versions of this value so we can get the one we want at that particular date. - List revisions = (List) client.listSettingRevisions(new SettingSelector().keys(keyName)); + List revisions = client.listSettingRevisions(new SettingSelector().keys(keyName)).stream().collect(Collectors.toList()); assertNotNull(revisions); assertEquals(3, revisions.size()); // We want to fetch the configuration setting when we first updated its value. SettingSelector options = new SettingSelector().keys(keyName).acceptDatetime(revisions.get(1).lastModified()); - assertConfigurationEquals(updated, ((List) client.listSettings(options)).get(0)); + assertConfigurationEquals(updated, (client.listSettings(options).stream().collect(Collectors.toList())).get(0)); } /** @@ -401,13 +406,13 @@ public void listRevisions() { assertConfigurationEquals(updated2, client.setSetting(updated2)); // Get all revisions for a key, they are listed in descending order. - List revisions = (List) client.listSettingRevisions(new SettingSelector().keys(keyName)); + List revisions = client.listSettingRevisions(new SettingSelector().keys(keyName)).stream().collect(Collectors.toList()); assertConfigurationEquals(updated2, revisions.get(0)); assertConfigurationEquals(updated, revisions.get(1)); assertConfigurationEquals(original, revisions.get(2)); // Verifies that we can select specific fields. - revisions = (List) client.listSettingRevisions(new SettingSelector().keys(keyName).fields(SettingFields.KEY, SettingFields.ETAG)); + revisions = client.listSettingRevisions(new SettingSelector().keys(keyName).fields(SettingFields.KEY, SettingFields.ETAG)).stream().collect(Collectors.toList()); validateListRevisions(updated2, revisions.get(0)); validateListRevisions(updated, revisions.get(1)); validateListRevisions(original, revisions.get(2)); @@ -426,7 +431,7 @@ public void listRevisionsWithMultipleKeys() { assertConfigurationEquals(testInput.get(2), client.addSetting(testInput.get(2))); assertConfigurationEquals(testInput.get(3), client.updateSetting(testInput.get(3))); - return (List) client.listSettingRevisions(new SettingSelector().keys(key, key2)); + return client.listSettingRevisions(new SettingSelector().keys(key, key2)); }); } @@ -444,7 +449,7 @@ public void listRevisionsWithMultipleLabels() { assertConfigurationEquals(testInput.get(2), client.addSetting(testInput.get(2))); assertConfigurationEquals(testInput.get(3), client.updateSetting(testInput.get(3))); - return (List) client.listSettingRevisions(new SettingSelector().keys(key).labels(label, label2)); + return client.listSettingRevisions(new SettingSelector().keys(key).labels(label, label2)); }); } @@ -461,7 +466,7 @@ public void listRevisionsWithRange() { assertConfigurationEquals(updated, client.updateSetting(updated)); assertConfigurationEquals(updated2, client.updateSetting(updated2)); - List revisions = (List) client.listSettingRevisions(new SettingSelector().keys(key).range(new Range(1, 2))); + List revisions = client.listSettingRevisions(new SettingSelector().keys(key).range(new Range(1, 2))).stream().collect(Collectors.toList()); assertConfigurationEquals(updated, revisions.get(0)); assertConfigurationEquals(original, revisions.get(1)); } @@ -474,7 +479,7 @@ public void listRevisionsInvalidRange() { final ConfigurationSetting original = new ConfigurationSetting().key(key).value("myValue"); assertConfigurationEquals(original, client.addSetting(original)); - assertRestException(() -> client.listSettingRevisions(new SettingSelector().keys(key).range(new Range(0, 10))), + assertRestException(() -> client.listSettingRevisions(new SettingSelector().keys(key).range(new Range(0, 10))).forEach(cs -> cs.key()), HttpResponseStatus.REQUESTED_RANGE_NOT_SATISFIABLE.code()); } @@ -499,7 +504,7 @@ public void listRevisionsAcceptDateTime() { } // Gets all versions of this value. - List revisions = (List) client.listSettingRevisions(new SettingSelector().keys(keyName)); + List revisions = client.listSettingRevisions(new SettingSelector().keys(keyName)).stream().collect(Collectors.toList()); assertNotNull(revisions); assertEquals(3, revisions.size()); @@ -507,7 +512,7 @@ public void listRevisionsAcceptDateTime() { // We want to fetch all the revisions that existed up and including when the first revision was created. // Revisions are returned in descending order from creation date. SettingSelector options = new SettingSelector().keys(keyName).acceptDatetime(revisions.get(1).lastModified()); - revisions = (List) client.listSettingRevisions(options); + revisions = client.listSettingRevisions(options).stream().collect(Collectors.toList()); assertConfigurationEquals(updated, revisions.get(0)); assertConfigurationEquals(original, revisions.get(1)); } @@ -523,7 +528,49 @@ public void listRevisionsWithPagination() { } SettingSelector filter = new SettingSelector().keys(keyPrefix).labels(labelPrefix); - assertEquals(numberExpected, ((List) client.listSettingRevisions(filter)).size()); + assertEquals(numberExpected, client.listSettingRevisions(filter).stream().collect(Collectors.toList()).size()); + } + + /** + * Verifies that, given a ton of revisions, we can process {@link java.util.stream.Stream} multiple time and get same result. + * (ie. where 'nextLink' has a URL pointing to the next page of results.) + */ + public void listRevisionsWithPaginationAndRepeatStream() { + final int numberExpected = 50; + for (int value = 0; value < numberExpected; value++) { + client.setSetting(new ConfigurationSetting().key(keyPrefix).value("myValue" + value).label(labelPrefix)); + } + + SettingSelector filter = new SettingSelector().keys(keyPrefix).labels(labelPrefix); + PagedIterable configurationSettingPagedIterable = client.listSettingRevisions(filter); + assertEquals(numberExpected, configurationSettingPagedIterable.stream().collect(Collectors.toList()).size()); + + assertEquals(numberExpected, configurationSettingPagedIterable.stream().collect(Collectors.toList()).size()); + } + + /** + * Verifies that, given a ton of revisions, we can iterate over multiple time and get same result. + * (ie. where 'nextLink' has a URL pointing to the next page of results.) + */ + public void listRevisionsWithPaginationAndRepeatIterator() { + final int numberExpected = 50; + for (int value = 0; value < numberExpected; value++) { + client.setSetting(new ConfigurationSetting().key(keyPrefix).value("myValue" + value).label(labelPrefix)); + } + + SettingSelector filter = new SettingSelector().keys(keyPrefix).labels(labelPrefix); + + PagedIterable configurationSettingPagedIterable = client.listSettingRevisions(filter); + List configurationSettingList1 = new ArrayList<>(); + List configurationSettingList2 = new ArrayList<>(); + + configurationSettingPagedIterable.iterator().forEachRemaining(configurationSetting -> configurationSettingList1.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList1.size()); + + configurationSettingPagedIterable.iterator().forEachRemaining(configurationSetting -> configurationSettingList2.add(configurationSetting)); + assertEquals(numberExpected, configurationSettingList2.size()); + + assertArrayEquals(configurationSettingList1.toArray(), configurationSettingList2.toArray()); } /** @@ -535,9 +582,9 @@ public void listSettingsWithPagination() { for (int value = 0; value < numberExpected; value++) { client.setSetting(new ConfigurationSetting().key(keyPrefix + "-" + value).value("myValue").label(labelPrefix)); } - SettingSelector filter = new SettingSelector().keys(keyPrefix + "-*").labels(labelPrefix); - assertEquals(numberExpected, ((List) client.listSettings(filter)).size()); + + assertEquals(numberExpected, client.listSettings(filter).stream().count()); } /** @@ -556,9 +603,10 @@ public void getSettingWhenValueNotUpdated() { } public void deleteAllSettings() { - for (ConfigurationSetting configurationSetting : client.listSettings(new SettingSelector().keys("*"))) { + + client.listSettings(new SettingSelector().keys("*")).forEach(configurationSetting -> { logger.info("Deleting key:label [{}:{}]. isLocked? {}", configurationSetting.key(), configurationSetting.label(), configurationSetting.isLocked()); client.deleteSetting(configurationSetting); - } + }); } } diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java index 07fc0d897d44..097d604b5be8 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.data.appconfiguration; + import com.azure.data.appconfiguration.credentials.ConfigurationClientCredentials; import com.azure.data.appconfiguration.models.ConfigurationSetting; import com.azure.data.appconfiguration.models.SettingFields; @@ -307,22 +308,18 @@ void deleteSettingWithETagRunner(BiConsumer> testRunner) { + void listWithMultipleKeysRunner(String key, String key2, BiFunction> testRunner) { final ConfigurationSetting setting = new ConfigurationSetting().key(key).value("value"); final ConfigurationSetting setting2 = new ConfigurationSetting().key(key2).value("value"); final Set expectedSelection = new HashSet<>(Arrays.asList(setting, setting2)); - - for (ConfigurationSetting actual : testRunner.apply(setting, setting2)) { - expectedSelection.removeIf(expected -> expected.equals(cleanResponse(expected, actual))); - } - + testRunner.apply(setting, setting2).forEach(actual -> expectedSelection.removeIf(expected -> expected.equals(cleanResponse(expected, actual)))); assertTrue(expectedSelection.isEmpty()); } @Test public abstract void listWithMultipleLabels(); - void listWithMultipleLabelsRunner(String key, String label, String label2, BiFunction> testRunner) { + void listWithMultipleLabelsRunner(String key, String label, String label2, BiFunction> testRunner) { final ConfigurationSetting setting = new ConfigurationSetting().key(key).value("value").label(label); final ConfigurationSetting setting2 = new ConfigurationSetting().key(key).value("value").label(label2); final Set expectedSelection = new HashSet<>(Arrays.asList(setting, setting2)); @@ -337,7 +334,7 @@ void listWithMultipleLabelsRunner(String key, String label, String label2, BiFun @Test public abstract void listSettingsSelectFields(); - void listSettingsSelectFieldsRunner(BiFunction, SettingSelector, List> testRunner) { + void listSettingsSelectFieldsRunner(BiFunction, SettingSelector, Iterable> testRunner) { final String label = "my-first-mylabel"; final String label2 = "my-second-mylabel"; final int numberToCreate = 8; @@ -386,7 +383,7 @@ static void validateListRevisions(ConfigurationSetting expected, ConfigurationSe @Test public abstract void listRevisionsWithMultipleKeys(); - void listRevisionsWithMultipleKeysRunner(String key, String key2, Function, List> testRunner) { + void listRevisionsWithMultipleKeysRunner(String key, String key2, Function, Iterable> testRunner) { final ConfigurationSetting setting = new ConfigurationSetting().key(key).value("value"); final ConfigurationSetting settingUpdate = new ConfigurationSetting().key(setting.key()).value("updatedValue"); final ConfigurationSetting setting2 = new ConfigurationSetting().key(key2).value("value"); @@ -404,7 +401,7 @@ void listRevisionsWithMultipleKeysRunner(String key, String key2, Function, List> testRunner) { + void listRevisionsWithMultipleLabelsRunner(String key, String label, String label2, Function, Iterable> testRunner) { final ConfigurationSetting setting = new ConfigurationSetting().key(key).value("value").label(label); final ConfigurationSetting settingUpdate = new ConfigurationSetting().key(setting.key()).label(setting.label()).value("updatedValue"); final ConfigurationSetting setting2 = new ConfigurationSetting().key(key).value("value").label(label2); @@ -434,6 +431,12 @@ void listRevisionsWithMultipleLabelsRunner(String key, String label, String labe @Test public abstract void listSettingsWithPagination(); + @Test + public abstract void listRevisionsWithPaginationAndRepeatStream(); + + @Test + public abstract void listRevisionsWithPaginationAndRepeatIterator(); + @Ignore("Getting a configuration setting only when the value has changed is not a common scenario.") @Test public abstract void getSettingWhenValueNotUpdated(); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json new file mode 100644 index 000000000000..5a8b8a78347b --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatIterator.json @@ -0,0 +1,1566 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bceb4088-c3b0-4454-a66a-0c9151fa7e71", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"p0MB3FVqBFZjVNLxsswPOLhAhbw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzQ=;sn=355874", + "x-ms-request-id" : "bceb4088-c3b0-4454-a66a-0c9151fa7e71", + "Body" : "{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "d2bdf27e-408f-4b17-b493-d1ffacd6326d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4193214e-5f67-4270-ab89-54f42fa54127", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"00dvZCg3Agikg0apkpzWHdwbWg3\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzU=;sn=355875", + "x-ms-request-id" : "4193214e-5f67-4270-ab89-54f42fa54127", + "Body" : "{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "3000c086-0f8a-47f1-aeaa-9a69161312d7", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "54658145-c0fb-47fa-b631-1cc420a6b02d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4NzY=;sn=355876", + "x-ms-request-id" : "54658145-c0fb-47fa-b631-1cc420a6b02d", + "Body" : "{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "07d6814d-ab25-46e1-afa4-655d3b0b6590", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a7fa2fe0-fe9c-4abb-9271-0e9d6f312b27", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzc=;sn=355877", + "x-ms-request-id" : "a7fa2fe0-fe9c-4abb-9271-0e9d6f312b27", + "Body" : "{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "de2ef565-d821-4034-baab-c0c9a40126cc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7e383573-4916-4de1-b8d8-fa1f9efdc5d0", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"p9RxmrmZRawSLeckvkXstrivMyo\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzg=;sn=355878", + "x-ms-request-id" : "7e383573-4916-4de1-b8d8-fa1f9efdc5d0", + "Body" : "{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "1c7acd25-7b63-4577-acb3-8ad7ea36ae69", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "136b4995-a72d-4904-b6ba-060ad4944288", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"8Devdke7sMPe04s3PwZKw6qfk6z\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4Nzk=;sn=355879", + "x-ms-request-id" : "136b4995-a72d-4904-b6ba-060ad4944288", + "Body" : "{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "c93dfa6f-fd73-42a4-b034-03408215476a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "be84bf67-fb78-4567-9e94-0048949e6268", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YhAhxzohYdYHtwflMeYCW9lGmSI\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODA=;sn=355880", + "x-ms-request-id" : "be84bf67-fb78-4567-9e94-0048949e6268", + "Body" : "{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "c1d401aa-3848-4f54-88f6-efb2089d1ea6", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bd7e7b5f-2015-4321-a406-7e7803234eac", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"C8shr4IPeLKH9OH389cfhCWnluO\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODE=;sn=355881", + "x-ms-request-id" : "bd7e7b5f-2015-4321-a406-7e7803234eac", + "Body" : "{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}", + "x-ms-client-request-id" : "54bae747-9a00-453a-ae47-6d0156a712c9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bd0bfec6-f4c5-41d7-addf-77e69d7fe4a8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Up43irEjbjqalUXffHvAAY8IOSK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODI=;sn=355882", + "x-ms-request-id" : "bd0bfec6-f4c5-41d7-addf-77e69d7fe4a8", + "Body" : "{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "a2a7eba3-7293-48cc-9a33-9e9d1d8296cf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "48cfda9c-8d2b-479d-9f44-0141d7dd1360", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODM=;sn=355883", + "x-ms-request-id" : "48cfda9c-8d2b-479d-9f44-0141d7dd1360", + "Body" : "{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "cb067747-0ce6-4b1f-a11d-f401bf07177f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0af69448-1fc5-453e-8ae3-1f29cafdf993", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"udup4cnXm2J1wCkSX6hrEsmp0jS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODQ=;sn=355884", + "x-ms-request-id" : "0af69448-1fc5-453e-8ae3-1f29cafdf993", + "Body" : "{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "3af5db32-27a1-489c-b880-78cc41073256", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b3395e3a-c98f-477d-88ac-14562005d1bc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"620Rpelck23ILRestB0TMMwA0AX\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODU=;sn=355885", + "x-ms-request-id" : "b3395e3a-c98f-477d-88ac-14562005d1bc", + "Body" : "{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "d1b59f2d-5aa1-42bb-b533-85ae24b89817", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "61e68673-4082-4a35-bda2-8a3942331829", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"q5W7UXp1miYWUjOljt6NqIBxQCL\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODY=;sn=355886", + "x-ms-request-id" : "61e68673-4082-4a35-bda2-8a3942331829", + "Body" : "{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "7620189b-34a9-4434-a5ff-64a14525b929", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "39140317-21d7-45de-819e-d95abdebf35a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Usldr2j3QJbxVgeNv8r9rNpwq05\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODc=;sn=355887", + "x-ms-request-id" : "39140317-21d7-45de-819e-d95abdebf35a", + "Body" : "{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "65ad371d-3858-4e73-826c-cd9d09320083", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "40ac7bb8-ed66-4ae2-b989-b337df250088", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"vlaOlFXK0JhM5pTaFesWP2IjN4q\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODg=;sn=355888", + "x-ms-request-id" : "40ac7bb8-ed66-4ae2-b989-b337df250088", + "Body" : "{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "cdefd95b-8608-4719-b83d-bed12685ca85", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bf774467-8a53-4f19-81a4-11a02cab034f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"PuS2hCuYdTOzQMN9DrsXpeAggwm\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4ODk=;sn=355889", + "x-ms-request-id" : "bf774467-8a53-4f19-81a4-11a02cab034f", + "Body" : "{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "006aec97-d3eb-4fca-9a1b-81cdab2c1bf2", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "225f520a-d0ef-425a-80d4-fcc99ef4769e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"twa1k4YYgm4NxGP9nZHvYamP4CN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTA=;sn=355890", + "x-ms-request-id" : "225f520a-d0ef-425a-80d4-fcc99ef4769e", + "Body" : "{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "55b82130-96dd-4dae-9164-c0f895d93dab", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:56 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f2e7480d-66bf-4ba4-be50-e0185ce45f5f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XP7Pbv623eatufHiKTkq5HpFDSa\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTE=;sn=355891", + "x-ms-request-id" : "f2e7480d-66bf-4ba4-be50-e0185ce45f5f", + "Body" : "{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "70f80ed5-cfbb-47a2-8adf-38c8a86442a4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "85cdb848-4c94-4d5e-951a-aed3241e3b0e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"wHw9EdHFL2ieEAXdBEPem9KW0A8\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTI=;sn=355892", + "x-ms-request-id" : "85cdb848-4c94-4d5e-951a-aed3241e3b0e", + "Body" : "{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "12960f73-ddb1-4851-9111-7360667a7a56", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9fb59f85-2e10-429d-b81b-30db040b9fb9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"oZwOhlAepkUSGd1qN7oTZLdKCJV\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTM=;sn=355893", + "x-ms-request-id" : "9fb59f85-2e10-429d-b81b-30db040b9fb9", + "Body" : "{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "4130669e-ac5e-4f43-b1bd-43abe585533c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3428896b-437d-4fac-abe3-5632d3cbd658", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTQ=;sn=355894", + "x-ms-request-id" : "3428896b-437d-4fac-abe3-5632d3cbd658", + "Body" : "{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "a069cebe-a5b4-48c5-95c5-94c3d7d3eaf9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "06ec0683-2f72-4744-bb42-ccd9d5c3652a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"l9X9deLtYeTmwqTucwoYtzP2EQh\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTU=;sn=355895", + "x-ms-request-id" : "06ec0683-2f72-4744-bb42-ccd9d5c3652a", + "Body" : "{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "f8c13f88-89a7-42b2-a5fc-48b34933a8e5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "bc39a19e-73f7-4913-b375-ab902891f0d3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"dSDAldBXJNPHSlUxrB3bVtAlrDr\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTY=;sn=355896", + "x-ms-request-id" : "bc39a19e-73f7-4913-b375-ab902891f0d3", + "Body" : "{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "e3a6bc07-2c07-4d50-a0ee-9dafe1f29caf", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "b580fe5c-2f9b-458e-bf93-e332af7e7579", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"bBXCRuTyjV48XDYWCld5T1wsJEK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTc=;sn=355897", + "x-ms-request-id" : "b580fe5c-2f9b-458e-bf93-e332af7e7579", + "Body" : "{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "ede36812-3d18-436e-9144-c57351baa827", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d6939593-32f1-4cbc-b1aa-4006dbe7125f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Xb3bwvgDRP2khWPffFH50MHQtCl\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTg=;sn=355898", + "x-ms-request-id" : "d6939593-32f1-4cbc-b1aa-4006dbe7125f", + "Body" : "{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "dae9c320-abb0-4e6f-afcf-9223b445db24", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "29327c51-8cc6-4834-bf1e-13d4dfeddd40", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"4kukVlmat3kcn834zTAvHSohV30\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU4OTk=;sn=355899", + "x-ms-request-id" : "29327c51-8cc6-4834-bf1e-13d4dfeddd40", + "Body" : "{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "8839dadb-9412-4702-8742-8aa3be5b6193", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d3b5e300-a1dc-4ab7-951b-e8a04942759f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDA=;sn=355900", + "x-ms-request-id" : "d3b5e300-a1dc-4ab7-951b-e8a04942759f", + "Body" : "{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"}", + "x-ms-client-request-id" : "4fb5a3ed-f863-496a-9920-e4836e1db3a5", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1c113ae9-ac4b-42c9-81e5-8bc97e91aa0f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7AQSsfZ2RojgFR1GXdyIsk1taDx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDE=;sn=355901", + "x-ms-request-id" : "1c113ae9-ac4b-42c9-81e5-8bc97e91aa0f", + "Body" : "{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "a16b10f0-40e0-429c-afa8-07fab38beb4a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1fde4c4b-3980-4161-8769-e87010f8af85", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDI=;sn=355902", + "x-ms-request-id" : "1fde4c4b-3980-4161-8769-e87010f8af85", + "Body" : "{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "bb552f2b-e76a-418b-898f-7ba8ca8f4b04", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "13c7f463-a3ab-4881-8539-fab9158cf413", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"MePefJ3j6qhoUpxBrrQVMazWYwF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDM=;sn=355903", + "x-ms-request-id" : "13c7f463-a3ab-4881-8539-fab9158cf413", + "Body" : "{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "900e6871-c5cc-47f4-a0a7-15897af86e6d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d650b894-71f1-42ca-ae70-e14f20e4a6ce", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"kahfNTljWMpvGYGG5ToAldMDbt3\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDQ=;sn=355904", + "x-ms-request-id" : "d650b894-71f1-42ca-ae70-e14f20e4a6ce", + "Body" : "{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "ceb5a2bd-a57b-471f-9db2-d894cf07ab46", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "0b7f919f-16fa-495f-8044-7dc8ebe15c6f", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jipB3VSo7sdhmaUZJuOmAaY9lgn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDU=;sn=355905", + "x-ms-request-id" : "0b7f919f-16fa-495f-8044-7dc8ebe15c6f", + "Body" : "{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "3b2a6948-cfe3-46e3-b77c-b915ed145251", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ffa87632-69ba-4acd-a73b-407caf5b049c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDY=;sn=355906", + "x-ms-request-id" : "ffa87632-69ba-4acd-a73b-407caf5b049c", + "Body" : "{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "db9a426b-f9a3-483c-b905-6a578adc3231", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "24f6641c-ef0d-4f91-8e79-0433aa1c4261", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDc=;sn=355907", + "x-ms-request-id" : "24f6641c-ef0d-4f91-8e79-0433aa1c4261", + "Body" : "{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "826d15bc-dd6a-4f03-ab9f-332b631b6639", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "134d2c55-8dd0-47f9-807b-0ae56872ab03", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7MoKeeNubE0KODpNpfTuGIzBlwd\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDg=;sn=355908", + "x-ms-request-id" : "134d2c55-8dd0-47f9-807b-0ae56872ab03", + "Body" : "{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "fce4b573-e443-4716-ad81-cf2b6af3bf43", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "99d685eb-18ab-4f52-acb1-49ae7c061328", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"7cLVmuRCZycFRHVEORZISnLXw24\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MDk=;sn=355909", + "x-ms-request-id" : "99d685eb-18ab-4f52-acb1-49ae7c061328", + "Body" : "{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "8ac07158-e099-4244-8375-33cf52f22309", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:57 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "939f6381-9adb-42b6-a258-85c5e60b4e9d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Eh0OBSjMqf5WJo7XokfdLlegCAt\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTA=;sn=355910", + "x-ms-request-id" : "939f6381-9adb-42b6-a258-85c5e60b4e9d", + "Body" : "{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "a90719d6-1772-46f4-a8d1-5fdc0ecdfaa6", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4fe59c3b-f372-4d30-8983-5dcbd9dbcbaa", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gIdLMmhbXMggBZivNgx67KwqZhm\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTE=;sn=355911", + "x-ms-request-id" : "4fe59c3b-f372-4d30-8983-5dcbd9dbcbaa", + "Body" : "{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "400df51a-c26b-4e72-ba96-1750332db3a3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "3fdf9c2f-c8a3-4fa4-bae1-0d95bfb417f8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"14PbIi2LwReXsOvpHAbKNjsr0XW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTI=;sn=355912", + "x-ms-request-id" : "3fdf9c2f-c8a3-4fa4-bae1-0d95bfb417f8", + "Body" : "{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "ce1ec363-1ddb-45dd-93f1-8d4df87c0676", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "902ac7d1-7c3b-4485-b99e-6935b3624ee1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"UfIowR4bMvwG95aQGEXNbbRehFD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTM=;sn=355913", + "x-ms-request-id" : "902ac7d1-7c3b-4485-b99e-6935b3624ee1", + "Body" : "{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "306a548d-f99b-4017-be6a-be66c47c4146", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "79fcc3a8-4b00-4f42-bc0d-3481c49b0898", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"PLkDXVkfpxYR062op1QXDEIJPeP\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTQ=;sn=355914", + "x-ms-request-id" : "79fcc3a8-4b00-4f42-bc0d-3481c49b0898", + "Body" : "{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "04f0efbb-fc25-4519-aa79-329af3c3f11f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d150fad7-9754-4f6d-a8c8-40ac74686e7a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTU=;sn=355915", + "x-ms-request-id" : "d150fad7-9754-4f6d-a8c8-40ac74686e7a", + "Body" : "{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "d1d19ec4-e9a5-49a1-9bce-7c95d25d3566", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "af50b9c5-748a-4d30-96f8-82e5dbafb9eb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTY=;sn=355916", + "x-ms-request-id" : "af50b9c5-748a-4d30-96f8-82e5dbafb9eb", + "Body" : "{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "f6efcf61-6a26-4e4e-b203-f57edf2eae44", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2f45673f-9282-4a15-b872-12b165bc45bb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fnDLu9m9abKhRRpj5exGHghyNT2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTc=;sn=355917", + "x-ms-request-id" : "2f45673f-9282-4a15-b872-12b165bc45bb", + "Body" : "{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "3a66dc81-48f5-49d6-8120-cab67ec994ad", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "19b3197a-c6ba-4e22-8bc7-00a7312f426a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"lZJMSpLWpxr8fDMPv5MTslfH3es\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTg=;sn=355918", + "x-ms-request-id" : "19b3197a-c6ba-4e22-8bc7-00a7312f426a", + "Body" : "{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "7fa7acef-f262-4868-9a82-0b0508f2acad", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "46f02fb7-4cc6-4a65-982a-9de3ded6fbab", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"KbRgqrExC3HwExbGiEURez7MCe7\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MTk=;sn=355919", + "x-ms-request-id" : "46f02fb7-4cc6-4a65-982a-9de3ded6fbab", + "Body" : "{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "d83c2ae0-419f-43e5-bffa-4c924ca11965", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:58 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cb11df65-b755-4c3a-94bb-c70c343374ec", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"SKQfsxODWRLzlc9W71gm9KlymaQ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjA=;sn=355920", + "x-ms-request-id" : "cb11df65-b755-4c3a-94bb-c70c343374ec", + "Body" : "{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"}", + "x-ms-client-request-id" : "196078e0-61a2-458f-84df-2bb154b19bfa", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "96d9e214-32a1-4849-98d8-17c4bac4e827", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"mwq67iQg4n3SJNxi2N84nLHVAjp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjE=;sn=355921", + "x-ms-request-id" : "96d9e214-32a1-4849-98d8-17c4bac4e827", + "Body" : "{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", + "x-ms-client-request-id" : "a6040bee-0015-4422-b9ce-3645b17a0ada", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "91960e5d-948a-4d19-ad07-76a3980416cc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TpKeD6knT84Bs1w9jurOrBpdSIV\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjI=;sn=355922", + "x-ms-request-id" : "91960e5d-948a-4d19-ad07-76a3980416cc", + "Body" : "{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", + "x-ms-client-request-id" : "cda1f520-288e-4356-8e65-97fc3b2543d9", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "63b39d90-8ad5-41ae-9417-6505154c8a9a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"sOK6GPuWPLaVj9h4PWvdIADBa7E\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", + "x-ms-request-id" : "63b39d90-8ad5-41ae-9417-6505154c8a9a", + "Body" : "{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", + "x-ms-client-request-id" : "28cf2fda-caf5-44e5-b51e-87cbcc710b31", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key74257&label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "8ac01a41-9074-4714-87b7-56a4ab749e11", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", + "x-ms-request-id" : "8ac01a41-9074-4714-87b7-56a4ab749e11", + "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}]}", + "x-ms-client-request-id" : "8b6367f4-d5d5-44fc-88ba-2373a3ffc68c", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key74257&label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0 azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "eea14767-af9a-4d00-80f7-6aff532ebcf6", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", + "x-ms-request-id" : "eea14767-af9a-4d00-80f7-6aff532ebcf6", + "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"TpKeD6knT84Bs1w9jurOrBpdSIV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"mwq67iQg4n3SJNxi2N84nLHVAjp\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"},{\"etag\":\"SKQfsxODWRLzlc9W71gm9KlymaQ\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"KbRgqrExC3HwExbGiEURez7MCe7\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"lZJMSpLWpxr8fDMPv5MTslfH3es\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"fnDLu9m9abKhRRpj5exGHghyNT2\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"ttkE3tSHjAz5g3JZB2xBUwWcCc5\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"YBYK7AOZFn8dvB7JQYsbMs4rPCN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"PLkDXVkfpxYR062op1QXDEIJPeP\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"UfIowR4bMvwG95aQGEXNbbRehFD\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"14PbIi2LwReXsOvpHAbKNjsr0XW\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"gIdLMmhbXMggBZivNgx67KwqZhm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"Eh0OBSjMqf5WJo7XokfdLlegCAt\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7cLVmuRCZycFRHVEORZISnLXw24\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7MoKeeNubE0KODpNpfTuGIzBlwd\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"m9MW3xrJBfXhHcEkmJaaJF5OPKw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"9EhSnnaOQOS5Lh2HfxNhrwBS1su\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"jipB3VSo7sdhmaUZJuOmAaY9lgn\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"kahfNTljWMpvGYGG5ToAldMDbt3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"MePefJ3j6qhoUpxBrrQVMazWYwF\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"eYXq9IaXn6ixTKt0JAOKGZhNJOS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"7AQSsfZ2RojgFR1GXdyIsk1taDx\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:58+00:00\"},{\"etag\":\"8BO9QpmYmpcOOBJj0OyQYcWwz7A\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"4kukVlmat3kcn834zTAvHSohV30\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Xb3bwvgDRP2khWPffFH50MHQtCl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"bBXCRuTyjV48XDYWCld5T1wsJEK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"dSDAldBXJNPHSlUxrB3bVtAlrDr\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"l9X9deLtYeTmwqTucwoYtzP2EQh\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"7CQJNMuky9Gqq9Qcqsgj22NdG5F\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"oZwOhlAepkUSGd1qN7oTZLdKCJV\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"wHw9EdHFL2ieEAXdBEPem9KW0A8\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"XP7Pbv623eatufHiKTkq5HpFDSa\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"twa1k4YYgm4NxGP9nZHvYamP4CN\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"PuS2hCuYdTOzQMN9DrsXpeAggwm\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"vlaOlFXK0JhM5pTaFesWP2IjN4q\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Usldr2j3QJbxVgeNv8r9rNpwq05\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"q5W7UXp1miYWUjOljt6NqIBxQCL\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"620Rpelck23ILRestB0TMMwA0AX\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"udup4cnXm2J1wCkSX6hrEsmp0jS\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"ZXkcRmcmYybeUZfIoXHjx3h6gHl\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"Up43irEjbjqalUXffHvAAY8IOSK\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:57+00:00\"},{\"etag\":\"C8shr4IPeLKH9OH389cfhCWnluO\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"YhAhxzohYdYHtwflMeYCW9lGmSI\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"8Devdke7sMPe04s3PwZKw6qfk6z\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p9RxmrmZRawSLeckvkXstrivMyo\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"M1Op5GHGFIhiJ2UGh5oOtUBqLUM\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"Av6PbtuhxNQ1Izr7PKoVfXD1laB\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"00dvZCg3Agikg0apkpzWHdwbWg3\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"},{\"etag\":\"p0MB3FVqBFZjVNLxsswPOLhAhbw\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:56+00:00\"}]}", + "x-ms-client-request-id" : "8b6367f4-d5d5-44fc-88ba-2373a3ffc68c", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv?key=key74257%2a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:58 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "de75e1a4-ae87-4378-b918-9fd96371c419", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjM=;sn=355923", + "x-ms-request-id" : "de75e1a4-ae87-4378-b918-9fd96371c419", + "Body" : "{\"items\":[{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}]}", + "x-ms-client-request-id" : "9a7fbd1e-0aad-46c7-8075-03123c09323a", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "DELETE", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key74257?label=badac284", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:52:59 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:52:59 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "485ac8fa-749a-4197-8572-bac152a72d87", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"sOK6GPuWPLaVj9h4PWvdIADBa7E\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjQ=;sn=355924", + "x-ms-request-id" : "485ac8fa-749a-4197-8572-bac152a72d87", + "Body" : "{\"etag\":\"sOK6GPuWPLaVj9h4PWvdIADBa7E\",\"key\":\"key74257\",\"label\":\"badac284\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:52:59+00:00\"}", + "x-ms-client-request-id" : "374e79d5-8a47-4104-9479-014ee085da6b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + } ], + "variables" : [ "key74257", "badac284" ] +} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json new file mode 100644 index 000000000000..0bb6063c5eac --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/resources/session-records/listRevisionsWithPaginationAndRepeatStream.json @@ -0,0 +1,1566 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:28 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a4f034dc-dfa5-4c15-8895-1e8d57755b42", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jNiyP7Q77USDs4C4RBL5k0z2gc0\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjU=;sn=355925", + "x-ms-request-id" : "a4f034dc-dfa5-4c15-8895-1e8d57755b42", + "Body" : "{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}", + "x-ms-client-request-id" : "6ddf46d2-bfb5-4604-afba-7d1983f04c5a", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "cdd073c2-6ca5-400d-a176-e7eb3d914d91", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MjY=;sn=355926", + "x-ms-request-id" : "cdd073c2-6ca5-400d-a176-e7eb3d914d91", + "Body" : "{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "e1778f9c-0570-4916-ac88-90e56221741f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9e679bcd-68bf-4de0-82cc-81bdb2f71eef", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XCDiu4RIimqAHyMjgaPElT7LAB7\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjc=;sn=355927", + "x-ms-request-id" : "9e679bcd-68bf-4de0-82cc-81bdb2f71eef", + "Body" : "{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "380f0144-af69-4bb3-bf65-4cecbc2d14ed", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2c70ebc5-4198-4bb3-8bf2-ec8961b1f676", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"I3waB2sqcjR0lolm4oPGGVQf2UN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjg=;sn=355928", + "x-ms-request-id" : "2c70ebc5-4198-4bb3-8bf2-ec8961b1f676", + "Body" : "{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "9bd90a9d-0a84-49f2-8157-dce79d181425", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c537ba3c-7a18-493b-a03c-2c7c30be0701", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"k3xWQWwFob9U0iekEexrOsvQNdS\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mjk=;sn=355929", + "x-ms-request-id" : "c537ba3c-7a18-493b-a03c-2c7c30be0701", + "Body" : "{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "b65e35d2-e068-4694-b88b-db3387f3e067", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d65b98cf-3204-4ddd-9d75-32d58fffe292", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"noNDOjplAcflJhlW0rxP8C59HxC\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzA=;sn=355930", + "x-ms-request-id" : "d65b98cf-3204-4ddd-9d75-32d58fffe292", + "Body" : "{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "5b77389e-113f-441d-b642-c2a0a0d00599", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e6b714fb-a41b-4923-92a9-d1480c4772bf", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"PvQgsbCoKItfkYjdSehNSGefBCw\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzE=;sn=355931", + "x-ms-request-id" : "e6b714fb-a41b-4923-92a9-d1480c4772bf", + "Body" : "{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "a2fadaf5-19d3-45fd-b0a3-4147ad342f0d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "112815b4-cced-4d38-b920-3e8b9daa54a2", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"lCr5xrN9rShZSx7NEEwlKU5dEjN\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzI=;sn=355932", + "x-ms-request-id" : "112815b4-cced-4d38-b920-3e8b9daa54a2", + "Body" : "{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "59e9d54e-51a6-424e-b948-0706d47382dc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "a5dafbf5-54bb-4634-86fe-3910cf52b957", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"fUT8brix0evbfPrVlOPegoO1msD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzM=;sn=355933", + "x-ms-request-id" : "a5dafbf5-54bb-4634-86fe-3910cf52b957", + "Body" : "{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "96292ddc-22fe-4dd1-80a8-833631335ade", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "334e2859-ae74-493a-8883-d95ab3ea2fcf", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzQ=;sn=355934", + "x-ms-request-id" : "334e2859-ae74-493a-8883-d95ab3ea2fcf", + "Body" : "{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "db3d4b2d-4c59-4c63-a8a0-e0a41ecf2c6b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:28 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c6da7221-0893-453d-bafd-1ac2fc526dbb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzU=;sn=355935", + "x-ms-request-id" : "c6da7221-0893-453d-bafd-1ac2fc526dbb", + "Body" : "{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "8d3e433c-ad2f-45d4-ba75-21b9987f7797", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2e886634-4c57-4c2c-8e31-bbf82a77d47b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"GhklfKlQ6puZhqTH3M2dhfeOf78\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5MzY=;sn=355936", + "x-ms-request-id" : "2e886634-4c57-4c2c-8e31-bbf82a77d47b", + "Body" : "{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "9d68d0f7-98ca-4244-9898-2737ec455385", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c109141a-d9c0-478b-9d08-1026e216275b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"AQssSuVEmEAOPORA8SNAx56WEA4\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzc=;sn=355937", + "x-ms-request-id" : "c109141a-d9c0-478b-9d08-1026e216275b", + "Body" : "{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "5d75bc25-b415-402f-a65b-78226278b879", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c6b711b8-6003-426c-8e29-cfcefc507143", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"Dqo1l1JkizHLTvs7GkjJPChvun9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzg=;sn=355938", + "x-ms-request-id" : "c6b711b8-6003-426c-8e29-cfcefc507143", + "Body" : "{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "272dcb27-b52e-490d-b4e3-eae0b1eacb56", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "353c85d1-3cc2-47c2-ab42-325a27292792", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YRDxr675Cakmv1WBpdzzpTpQ8BP\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Mzk=;sn=355939", + "x-ms-request-id" : "353c85d1-3cc2-47c2-ab42-325a27292792", + "Body" : "{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "aba7630e-1111-4578-9e1c-93394eb04798", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d3e0137b-f409-4789-a038-4496b83e1670", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"uP49wa2rA8KSMoe4ne7z9ozL4bn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDA=;sn=355940", + "x-ms-request-id" : "d3e0137b-f409-4789-a038-4496b83e1670", + "Body" : "{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "904405e5-6e42-4066-b5da-7ec7ebf0c74b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "347ef176-4466-4666-9d72-c1efeea7a8cc", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDE=;sn=355941", + "x-ms-request-id" : "347ef176-4466-4666-9d72-c1efeea7a8cc", + "Body" : "{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "65904f6c-bdda-404c-8195-b077116de50b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "4c602770-0a21-44a3-b24d-2b90e9a96e39", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDI=;sn=355942", + "x-ms-request-id" : "4c602770-0a21-44a3-b24d-2b90e9a96e39", + "Body" : "{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "5bfdd0df-4f44-4e53-bb4e-88524884659e", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "141d5539-2848-44d7-bbd6-1985c0d6dd8c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"upZrsv8iYzydWqYje7jHm9rHcXL\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDM=;sn=355943", + "x-ms-request-id" : "141d5539-2848-44d7-bbd6-1985c0d6dd8c", + "Body" : "{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "fb8fa450-4f23-4516-b231-51ec511a3357", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d0ccbba1-d154-483c-b02b-f092ed1d4fee", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"mwynFY1i5xgbBDjQCoMyG2tJJyn\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDQ=;sn=355944", + "x-ms-request-id" : "d0ccbba1-d154-483c-b02b-f092ed1d4fee", + "Body" : "{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "64e1f930-5beb-490f-a57d-250d7ec325b8", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7fb3486e-2908-4339-b236-e322fc8fc07c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDU=;sn=355945", + "x-ms-request-id" : "7fb3486e-2908-4339-b236-e322fc8fc07c", + "Body" : "{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"}", + "x-ms-client-request-id" : "9cbe13b0-be74-43e9-af15-407a930daa02", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7f4ccbcf-0a07-44fb-b676-8324cc554587", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"VQ34jz49f5kzGyRuhogVrUpwN7O\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDY=;sn=355946", + "x-ms-request-id" : "7f4ccbcf-0a07-44fb-b676-8324cc554587", + "Body" : "{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "a1774869-a4ff-4eb8-8e9a-37947d62c12f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "5a3a1a0f-1d2a-4fa9-907d-fcd5c8af8c29", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"nUG3aATwp4xd69HMBcX11TvIb22\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDc=;sn=355947", + "x-ms-request-id" : "5a3a1a0f-1d2a-4fa9-907d-fcd5c8af8c29", + "Body" : "{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "9f0652c4-50ad-43b9-8dd2-8ed3fb772d8b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "aa1d6058-20d5-4e61-a11a-5a466a5ec37e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"YxmRHNz0UUBT99nEvq9R3xWMi41\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDg=;sn=355948", + "x-ms-request-id" : "aa1d6058-20d5-4e61-a11a-5a466a5ec37e", + "Body" : "{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "5798ec0b-7d8b-4352-8205-9ccdbb2ca8a4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "22bae82c-3efe-4c16-9aba-b9b504c23efe", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NDk=;sn=355949", + "x-ms-request-id" : "22bae82c-3efe-4c16-9aba-b9b504c23efe", + "Body" : "{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "e30e13da-5d80-4582-a9d6-54298bc58005", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2c544de8-f45f-4afd-bd6f-9e0bdf2eadc1", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"gnLsef4Juk3ekuG1L9Y5kayR4KE\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTA=;sn=355950", + "x-ms-request-id" : "2c544de8-f45f-4afd-bd6f-9e0bdf2eadc1", + "Body" : "{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "601cbb5e-db9f-4081-9f3f-75c84d425d71", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "904aa2b0-3769-4b20-af59-cebe47c2d719", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"jqHhLOJHxJO2vhjNCGzE11wGD3j\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTE=;sn=355951", + "x-ms-request-id" : "904aa2b0-3769-4b20-af59-cebe47c2d719", + "Body" : "{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "2c61bfb1-ca29-489a-857e-571b06809d67", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "6bf45028-72fc-4091-8e15-7d9a793cc04d", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ggbKmyOxgmIg5fPkUJLYo617rkU\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTI=;sn=355952", + "x-ms-request-id" : "6bf45028-72fc-4091-8e15-7d9a793cc04d", + "Body" : "{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "fb959c4e-a161-4518-a49e-be1aaa2c4bdd", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e1cf23aa-2017-4f7f-a334-00554d91beb7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTM=;sn=355953", + "x-ms-request-id" : "e1cf23aa-2017-4f7f-a334-00554d91beb7", + "Body" : "{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "6d6a15aa-2a8e-413e-90ba-d4ee74dac32d", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "52d580a4-3bc2-4021-8763-1d1bdf7a3c21", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"ectYS6odE2dFHrJVKvZd2XsCsNk\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTQ=;sn=355954", + "x-ms-request-id" : "52d580a4-3bc2-4021-8763-1d1bdf7a3c21", + "Body" : "{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "5425dd3a-3905-4c3d-98d5-05b5b8d54b1b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:29 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "62f3ebdb-a438-43d6-bd0c-5dcf4385b164", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"a3qDyWPJlP8UuySqljnkRZcWbSx\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTU=;sn=355955", + "x-ms-request-id" : "62f3ebdb-a438-43d6-bd0c-5dcf4385b164", + "Body" : "{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "ce0e3ce0-a328-4b44-bee2-8aed4960cfce", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c4b76ac5-0fb0-47d5-9db1-96532e50eee9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"uvj2Gh9v4124k57JYXwYEZOntqp\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTY=;sn=355956", + "x-ms-request-id" : "c4b76ac5-0fb0-47d5-9db1-96532e50eee9", + "Body" : "{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "955b1254-fb2f-4cf0-9f04-2cc27542beba", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c3ff3750-cb51-46c8-8b3a-d1eccc4549d8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"MrM1BDpqECFyW8CdCiEfPPzz0gy\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTc=;sn=355957", + "x-ms-request-id" : "c3ff3750-cb51-46c8-8b3a-d1eccc4549d8", + "Body" : "{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "b603c55c-17f8-4ebf-b97b-12630fd29ff3", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "04d06d36-ea0f-4622-af53-119cc09a5018", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTg=;sn=355958", + "x-ms-request-id" : "04d06d36-ea0f-4622-af53-119cc09a5018", + "Body" : "{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "b0334f7e-0dc7-46f1-b799-8679603b91fe", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "7a9b2cc9-1467-4304-a402-0e3a3c0cc7a8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"P3dG0y5T3k4M1TMULVKsAuxnPNF\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NTk=;sn=355959", + "x-ms-request-id" : "7a9b2cc9-1467-4304-a402-0e3a3c0cc7a8", + "Body" : "{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "f37f4b13-38fa-4e03-9274-cd67d71d0a5c", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "12222853-c32d-4a0c-9f47-3fc1dc017482", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"83zr6N5go4zKpPvlwKTf2uoaoxK\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjA=;sn=355960", + "x-ms-request-id" : "12222853-c32d-4a0c-9f47-3fc1dc017482", + "Body" : "{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "2aed2ac7-d50e-4f24-8d2c-8a24098c375f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "89ec33ac-966e-4517-8bac-ece0fe12164a", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"XTsdMpFVDVeJkevXl8UlwspMKqW\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjE=;sn=355961", + "x-ms-request-id" : "89ec33ac-966e-4517-8bac-ece0fe12164a", + "Body" : "{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "6bee6ee8-ce77-4b59-afd8-882161125b65", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f17a1dde-e7ea-44a3-af2c-fc7cfd37cd76", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"SKL0U2WRmokCHZjXoAqdegKpVZH\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjI=;sn=355962", + "x-ms-request-id" : "f17a1dde-e7ea-44a3-af2c-fc7cfd37cd76", + "Body" : "{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "a5cc28d1-9d79-4807-93e9-a969b26b5d11", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ff36bac5-7acc-42c5-90ad-04b6579317cd", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"bmWEhDNsBrV1uzqbP5UgleufkJu\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjM=;sn=355963", + "x-ms-request-id" : "ff36bac5-7acc-42c5-90ad-04b6579317cd", + "Body" : "{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "03127d09-72b4-4914-bd20-261f965de54b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d4ab9aa0-a037-4525-b5cb-41b9b0bea1f3", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"QKgNZ00wWrfvkedoInI4IS7sTGB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjQ=;sn=355964", + "x-ms-request-id" : "d4ab9aa0-a037-4525-b5cb-41b9b0bea1f3", + "Body" : "{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "8b7aae12-7678-4299-9b84-f7d154bc9f6b", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "f1edb443-44c7-4182-a2ca-888139d8b56c", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"TP4kXbH9tqphIfWOg7t4aaUP9V9\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjU=;sn=355965", + "x-ms-request-id" : "f1edb443-44c7-4182-a2ca-888139d8b56c", + "Body" : "{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"}", + "x-ms-client-request-id" : "7a867d3d-5940-40b6-94e8-32e6a30c2c69", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d6813be1-a182-4fd1-8818-5c09850cdc2b", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"WtmJ27m8hLTawG2q6nsSwIM6i1n\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NjY=;sn=355966", + "x-ms-request-id" : "d6813be1-a182-4fd1-8818-5c09850cdc2b", + "Body" : "{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "22e293fb-2798-4d74-b808-1aa877b72f54", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ab6edd7f-8418-4579-ab6a-5665c58b8c75", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"qXRaj0Fh6afaaQW92k4h6JvVhD2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njc=;sn=355967", + "x-ms-request-id" : "ab6edd7f-8418-4579-ab6a-5665c58b8c75", + "Body" : "{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "894afe6c-a03e-4703-8ab0-135b7368fe73", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "9372cb31-72d6-4674-9698-fde1e31d0960", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"FDGQuEodmlMSNuCjIp37tZOpVnB\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njg=;sn=355968", + "x-ms-request-id" : "9372cb31-72d6-4674-9698-fde1e31d0960", + "Body" : "{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "7fb38d4e-c223-47c3-95de-a1c5f413621f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c5d93d76-79ae-45ba-a146-d3a2dffef727", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5Njk=;sn=355969", + "x-ms-request-id" : "c5d93d76-79ae-45ba-a146-d3a2dffef727", + "Body" : "{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "3e23af68-030b-476d-854e-833d2762f9d0", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "31640901-581a-4349-bfe0-c7dd034e08eb", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"BtQypwuQfOImh4BpxoH9jpnNXj2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzA=;sn=355970", + "x-ms-request-id" : "31640901-581a-4349-bfe0-c7dd034e08eb", + "Body" : "{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "ce349f1e-8db3-4801-a0e6-cb58d17bf091", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "ab01f83e-8bc7-4dcc-9e5f-78529205ee91", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzE=;sn=355971", + "x-ms-request-id" : "ab01f83e-8bc7-4dcc-9e5f-78529205ee91", + "Body" : "{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "56054950-fb97-4326-940a-108c1ce65e1f", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "2ce38b31-7808-44e4-8df0-da57c0630b27", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzI=;sn=355972", + "x-ms-request-id" : "2ce38b31-7808-44e4-8df0-da57c0630b27", + "Body" : "{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "e342bd50-c602-4200-ac33-54095fcec6bc", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "c8e815a3-d41b-485c-8aed-840105a9dd2e", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"79gGNL9vs3vTEgaSWqAn1kUV9xz\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzM=;sn=355973", + "x-ms-request-id" : "c8e815a3-d41b-485c-8aed-840105a9dd2e", + "Body" : "{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "25026f6c-1593-4466-b2a2-31795dc32ac4", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "PUT", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:30 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "e397bc6d-bf8e-4eed-9f63-acb576ac39c7", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"IPjAXqJXU1C8rF1kydehHCU1Uq2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", + "x-ms-request-id" : "e397bc6d-bf8e-4eed-9f63-acb576ac39c7", + "Body" : "{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "3c545fb1-2ed7-4d87-8662-6544ee3f04a1", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key94007&label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "649ac81e-77da-4288-9fc7-7723b467c82a", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", + "x-ms-request-id" : "649ac81e-77da-4288-9fc7-7723b467c82a", + "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}]}", + "x-ms-client-request-id" : "76d39dd5-b3b0-4ca6-b203-43c42a4942f1", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/revisions?key=key94007&label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0 azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "1c1d9bea-76fa-4db6-92e5-f3f6417d7939", + "Accept-Ranges" : "items", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", + "x-ms-request-id" : "1c1d9bea-76fa-4db6-92e5-f3f6417d7939", + "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"79gGNL9vs3vTEgaSWqAn1kUV9xz\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue48\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2mc5z3RxNs2a0MqR5sgJXmaBjnE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue47\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"kTKoMIe2RfsIyQcFeSbcyIxu9gT\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue46\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"BtQypwuQfOImh4BpxoH9jpnNXj2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue45\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"2N6LZ5MrGaiTH5gBFnELLhqA8N2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue44\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"FDGQuEodmlMSNuCjIp37tZOpVnB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue43\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"qXRaj0Fh6afaaQW92k4h6JvVhD2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue42\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"WtmJ27m8hLTawG2q6nsSwIM6i1n\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue41\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"},{\"etag\":\"TP4kXbH9tqphIfWOg7t4aaUP9V9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue40\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"QKgNZ00wWrfvkedoInI4IS7sTGB\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue39\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"bmWEhDNsBrV1uzqbP5UgleufkJu\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue38\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"SKL0U2WRmokCHZjXoAqdegKpVZH\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue37\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"XTsdMpFVDVeJkevXl8UlwspMKqW\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue36\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"83zr6N5go4zKpPvlwKTf2uoaoxK\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue35\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"P3dG0y5T3k4M1TMULVKsAuxnPNF\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue34\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"D2zHtjpFr4FC9a1bCjsc6QNiZ0W\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue33\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"MrM1BDpqECFyW8CdCiEfPPzz0gy\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue32\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"uvj2Gh9v4124k57JYXwYEZOntqp\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue31\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"a3qDyWPJlP8UuySqljnkRZcWbSx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue30\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ectYS6odE2dFHrJVKvZd2XsCsNk\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue29\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ymDGKm1NX2h4Gfpio9RSTKJ7rr9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue28\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"ggbKmyOxgmIg5fPkUJLYo617rkU\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue27\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"jqHhLOJHxJO2vhjNCGzE11wGD3j\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue26\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"gnLsef4Juk3ekuG1L9Y5kayR4KE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue25\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"U2X8ROJcTNIzRaMAuKzLI2b0EU1\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue24\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"YxmRHNz0UUBT99nEvq9R3xWMi41\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue23\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"nUG3aATwp4xd69HMBcX11TvIb22\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue22\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"VQ34jz49f5kzGyRuhogVrUpwN7O\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue21\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:30+00:00\"},{\"etag\":\"5ZHNlkJlMtNALJHYTMEFf8GfgWE\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue20\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"mwynFY1i5xgbBDjQCoMyG2tJJyn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue19\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"upZrsv8iYzydWqYje7jHm9rHcXL\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue18\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"cWcHBIcSdVBPrYdqfTC4FNgHBB4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue17\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"tWRhuDeaMMNRKzhXXCid1gJ3lKD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue16\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"uP49wa2rA8KSMoe4ne7z9ozL4bn\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue15\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"YRDxr675Cakmv1WBpdzzpTpQ8BP\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue14\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"Dqo1l1JkizHLTvs7GkjJPChvun9\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue13\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"AQssSuVEmEAOPORA8SNAx56WEA4\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue12\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"GhklfKlQ6puZhqTH3M2dhfeOf78\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue11\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"rs4ed1mEVqsWPTAQmdwUHpHyAA6\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue10\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"1CCYXGfgoUU8S7Z22eGpjfVdgCx\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue9\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"fUT8brix0evbfPrVlOPegoO1msD\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue8\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"lCr5xrN9rShZSx7NEEwlKU5dEjN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue7\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"PvQgsbCoKItfkYjdSehNSGefBCw\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue6\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"noNDOjplAcflJhlW0rxP8C59HxC\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue5\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"k3xWQWwFob9U0iekEexrOsvQNdS\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue4\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"I3waB2sqcjR0lolm4oPGGVQf2UN\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"XCDiu4RIimqAHyMjgaPElT7LAB7\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"0fbbfGX81nAx8ohTvfX6qjJsnyJ\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue1\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:29+00:00\"},{\"etag\":\"jNiyP7Q77USDs4C4RBL5k0z2gc0\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue0\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:28+00:00\"}]}", + "x-ms-client-request-id" : "76d39dd5-b3b0-4ca6-b203-43c42a4942f1", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "GET", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv?key=key94007%2a", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "d2ac8670-2990-467c-aa04-7c0903f51950", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzQ=;sn=355974", + "x-ms-request-id" : "d2ac8670-2990-467c-aa04-7c0903f51950", + "Body" : "{\"items\":[{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}]}", + "x-ms-client-request-id" : "b1f5f800-2e70-4e2e-b108-ff61a50398aa", + "Content-Type" : "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" + } + }, { + "Method" : "DELETE", + "Uri" : "https://hemant-appconfiguration.azconfig.io/kv/key94007?label=4f568078", + "Headers" : { + "User-Agent" : "azsdk-java-application-configuration/1.0.0-SNAPSHOT 1.8.0_212; Windows 10 10.0", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Server" : "nginx/1.13.12", + "Access-Control-Allow-Origin" : "*", + "Access-Control-Allow-Methods" : "GET, PUT, POST, DELETE, PATCH, OPTIONS", + "Connection" : "keep-alive", + "Last-Modified" : "Thu, 25 Jul 2019 23:53:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 25 Jul 2019 23:53:31 GMT", + "Access-Control-Allow-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "x-ms-correlation-request-id" : "45ed019e-9367-4a83-8a68-06076dd73562", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, x-ms-retry-after, x-ms-request-id, WWW-Authenticate", + "ETag" : "\"IPjAXqJXU1C8rF1kydehHCU1Uq2\"", + "Access-Control-Allow-Credentials" : "true", + "Sync-Token" : "zAJw6V16=NDotMSMzNTU5NzU=;sn=355975", + "x-ms-request-id" : "45ed019e-9367-4a83-8a68-06076dd73562", + "Body" : "{\"etag\":\"IPjAXqJXU1C8rF1kydehHCU1Uq2\",\"key\":\"key94007\",\"label\":\"4f568078\",\"content_type\":null,\"value\":\"myValue49\",\"tags\":{},\"locked\":false,\"last_modified\":\"2019-07-25T23:53:31+00:00\"}", + "x-ms-client-request-id" : "4a59737c-309a-4050-8aa5-20d687a44380", + "Content-Type" : "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" + } + } ], + "variables" : [ "key94007", "4f568078" ] +} \ No newline at end of file diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java index 48d1b422de65..4df299958bf7 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java @@ -21,14 +21,14 @@ *

Create a pipeline without configuration

* *
- * HttpPipeline.builder()
+ * new HttpPipelineBuilder()
  *     .build();
  * 
* *

Create a pipeline using the default HTTP client and a retry policy

* *
- * HttpPipeline.builder()
+ * new HttpPipelineBuilder()
  *     .httpClient(HttpClient.createDefault())
  *     .policies(new RetryPolicy())
  *     .build();
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/IterableResponse.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/IterableResponse.java
new file mode 100644
index 000000000000..abdb328a556c
--- /dev/null
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/IterableResponse.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.core.http.rest;
+
+import reactor.core.publisher.Flux;
+
+import java.util.Iterator;
+import java.util.stream.Stream;
+
+/**
+ * This class provides utility to iterate over values. All the values are preserved even if they are traversed multiple times.
+ *
+ * 

Code sample using Stream

+ * + * {@codesnippet com.azure.core.http.rest.iterableResponse.stream} + * + *

Code sample using Iterator

+ * + * {@codesnippet com.azure.core.http.rest.iterableResponse.iterator.while} + * + *

Code sample using Stream and filter

+ * + * {@codesnippet com.azure.core.http.rest.iterableResponse.stream.filter} + * + * @param The type of value in this {@link Iterable}. + * @see Iterable + */ +public class IterableResponse implements Iterable { + private final Flux flux; + + /** + * Creates instance given {@link Flux}. + * @param flux to iterate over + */ + public IterableResponse(Flux flux) { + this.flux = flux; + } + + /** + * Utility function to provide {@link Stream} of value T. + * It will provide same stream of T values if called multiple times. + * @return {@link Stream} of value T. + */ + public Stream stream() { + return flux.toStream(); + } + + /** + * Utility function to provide {@link Iterator} of value T. + * It will provide same collection of T values if called multiple times. + * @return {@link Iterator} of value T. + */ + @Override + public Iterator iterator() { + return flux.toIterable().iterator(); + } + +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java new file mode 100644 index 000000000000..cac6c353efae --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import java.util.stream.Stream; + +/** + * This class provides utility to iterate over {@link PagedResponse} using {@link Stream} and {@link Iterable} interfaces. + * + *

Code sample using {@link Stream} by page

+ * + * {@codesnippet com.azure.core.http.rest.pagedIterable.streamByPage} + * + *

Code sample using {@link Iterable} by page

+ * + * {@codesnippet com.azure.core.http.rest.pagedIterable.iterableByPage} + * + *

Code sample using {@link Iterable} by page and while loop

+ * + * {@codesnippet com.azure.core.http.rest.pagedIterable.iterableByPage.while} + * + * @param The type of value contained in this {@link IterableResponse}. + * @see PagedResponse + * @see IterableResponse + */ +public class PagedIterable extends IterableResponse { + private final PagedFlux pagedFlux; + + /** + * Creates instance given {@link PagedFlux}. + * @param pagedFlux to use as iterable + */ + public PagedIterable(PagedFlux pagedFlux) { + super(pagedFlux); + this.pagedFlux = pagedFlux; + } + + /** + * Retrieve the {@link Stream}, one page at a time. + * It will provide same {@link Stream} of T values from starting if called multiple times. + * @return {@link Stream} of {@link PagedResponse} + */ + public Stream> streamByPage() { + return pagedFlux.byPage().toStream(); + } + + /** + * Provides {@link Iterable} API for{ @link PagedResponse} + * It will provide same collection of T values from starting if called multiple times. + * @return {@link Iterable} interface + */ + public Iterable> iterableByPage() { + return pagedFlux.byPage().toIterable(); + } + +} diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java new file mode 100644 index 000000000000..1be07c3fba24 --- /dev/null +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpRequest; +import com.azure.core.implementation.http.PagedResponseBase; +import reactor.core.publisher.Flux; + +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * Code snippets for {@link IterableResponse} + */ +public class IterableResponseJavaDocCodeSnippets { + + /** + * Iterate over {@link java.util.stream.Stream} + * @throws MalformedURLException if can not create URL object. + */ + public void streamSnippet() throws MalformedURLException { + HttpHeaders httpHeaders = new HttpHeaders().put("header1", "value1") + .put("header2", "value2"); + HttpRequest httpRequest = new HttpRequest(HttpMethod.GET, new URL("http://localhost")); + + String deserializedHeaders = "header1,value1,header2,value2"; + + IterableResponse> myIterableResponse = + new IterableResponse<>(Flux.just(createPagedResponse(httpRequest, httpHeaders, deserializedHeaders, 1, 3))); + + // BEGIN: com.azure.core.http.rest.iterableResponse.stream + // process the stream + myIterableResponse.stream().forEach(resp -> { + if (resp.statusCode() == HttpURLConnection.HTTP_OK) { + System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d \n", value); + }); + } + }); + // END: com.azure.core.http.rest.iterableResponse.stream + } + + /** + * Iterate with {@link Iterator} interface. + * @throws MalformedURLException if can not create URL object. + */ + public void iteratorwhileSnippet() throws MalformedURLException { + HttpHeaders httpHeaders = new HttpHeaders().put("header1", "value1") + .put("header2", "value2"); + HttpRequest httpRequest = new HttpRequest(HttpMethod.GET, new URL("http://localhost")); + + String deserializedHeaders = "header1,value1,header2,value2"; + + IterableResponse> myIterableResponse = + new IterableResponse<>(Flux.just(createPagedResponse(httpRequest, httpHeaders, deserializedHeaders, 1, 3))); + + // BEGIN: com.azure.core.http.rest.iterableResponse.iterator.while + // Iterate over iterator + Iterator> ite = myIterableResponse.iterator(); + while (ite.hasNext()) { + PagedResponseBase resp = ite.next(); + if (resp.statusCode() == HttpURLConnection.HTTP_OK) { + System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d \n", value); + }); + } + } + // END: com.azure.core.http.rest.iterableResponse.iterator.while + } + + /** + * Iterate over {@link java.util.stream.Stream} + * @throws MalformedURLException if can not create URL object. + */ + public void iteratorStreamFilterSnippet() throws MalformedURLException { + HttpHeaders httpHeaders = new HttpHeaders().put("header1", "value1") + .put("header2", "value2"); + HttpRequest httpRequest = new HttpRequest(HttpMethod.GET, new URL("http://localhost")); + + String deserializedHeaders = "header1,value1,header2,value2"; + + IterableResponse> myIterableResponse = + new IterableResponse<>(Flux.just(createPagedResponse(httpRequest, httpHeaders, deserializedHeaders, 1, 3))); + + // BEGIN: com.azure.core.http.rest.iterableResponse.stream.filter + // process the stream + myIterableResponse.stream().filter(resp -> resp.statusCode() == HttpURLConnection.HTTP_OK) + .limit(10) + .forEach(resp -> { + System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d \n", value); + }); + }); + // END: com.azure.core.http.rest.iterableResponse.stream.filter + } + + private PagedResponseBase createPagedResponse(HttpRequest httpRequest, HttpHeaders httpHeaders, + String deserializedHeaders, int i, int noOfPages) { + return new PagedResponseBase<>(httpRequest, HttpURLConnection.HTTP_OK, + httpHeaders, + getItems(i), + i < noOfPages - 1 ? String.valueOf(i + 1) : null, + deserializedHeaders); + } + + private List getItems(Integer i) { + return IntStream.range(i * 3, i * 3 + 3).boxed().collect(Collectors.toList()); + } +} diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java new file mode 100644 index 000000000000..23e2b4be8a61 --- /dev/null +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedIterableJavaDocCodeSnippets.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import reactor.core.publisher.Mono; + +import java.util.Iterator; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * Code snippets for {@link PagedIterable} + */ +public class PagedIterableJavaDocCodeSnippets { + + /**Provides an example for iterate over each response using streamByPage function.**/ + public void streamByPageSnippet() { + + PagedFlux pagedFlux = createAnInstance(); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); + + // BEGIN: com.azure.core.http.rest.pagedIterable.streamByPage + // process the streamByPage + pagedIterableResponse.streamByPage().forEach(resp -> { + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.headers(), + resp.request().url(), resp.statusCode()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d %n", value); + }); + }); + // END: com.azure.core.http.rest.pagedIterable.streamByPage + } + + /**Provides an example for iterate over each response using iterableByPage function.**/ + public void iterateByPageSnippet() { + + PagedFlux pagedFlux = createAnInstance(); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); + + // BEGIN: com.azure.core.http.rest.pagedIterable.iterableByPage + // process the iterableByPage + pagedIterableResponse.iterableByPage().forEach(resp -> { + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.headers(), + resp.request().url(), resp.statusCode()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d %n", value); + }); + }); + // END: com.azure.core.http.rest.pagedIterable.iterableByPage + } + + /**Provides an example for iterate over each response using iterableByPage function and while loop.**/ + public void iterableByPageWhileSnippet() { + + PagedFlux pagedFlux = createAnInstance(); + PagedIterable pagedIterableResponse = new PagedIterable<>(pagedFlux); + + // BEGIN: com.azure.core.http.rest.pagedIterable.iterableByPage.while + // iterate over each page + Iterator> ite = pagedIterableResponse.iterableByPage().iterator(); + while (ite.hasNext()) { + PagedResponse resp = ite.next(); + System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.headers(), + resp.request().url(), resp.statusCode()); + resp.items().forEach(value -> { + System.out.printf("Response value is %d %n", value); + }); + } + // END: com.azure.core.http.rest.pagedIterable.iterableByPage.while + } + + /** + * Code snippets for creating an instance of {@link PagedFlux} + * @return An instance of {@link PagedFlux} + */ + public PagedFlux createAnInstance() { + + // BEGIN: com.azure.core.http.rest.pagedflux.instantiation + // A supplier that fetches the first page of data from source/service + Supplier>> firstPageRetriever = () -> getFirstPage(); + + // A function that fetches subsequent pages of data from source/service given a continuation token + Function>> nextPageRetriever = + continuationToken -> getNextPage(continuationToken); + + PagedFlux pagedFlux = new PagedFlux<>(firstPageRetriever, + nextPageRetriever); + // END: com.azure.core.http.rest.pagedflux.instantiation + return pagedFlux; + } + + /** + * Implementation not provided + * + * @param continuationToken Token to fetch the next page + * @return A {@link Mono} of {@link PagedResponse} containing items of type {@code Integer} + */ + private Mono> getNextPage(String continuationToken) { + return null; + } + + /** + * Implementation not provided + * + * @return A {@link Mono} of {@link PagedResponse} containing items of type {@code Integer} + */ + private Mono> getFirstPage() { + return null; + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/IterableResponseTest.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/IterableResponseTest.java new file mode 100644 index 000000000000..e74104f1a6b6 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/rest/IterableResponseTest.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.rest; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + +import reactor.core.publisher.Flux; + + +public class IterableResponseTest { + + @Rule + public TestName testName = new TestName(); + + @Before + public void setup() { + System.out.println("-------------- Running " + testName.getMethodName() + " -----------------------------"); + } + + /*Ensure that if we call stream multiple times, it always returns same values and they are same as original list of values.*/ + @Test + public void testIterableResponseStreamFromStart() { + IterableResponse iterableResponse = getIntegerIterableResponse(2, 5); + Assert.assertEquals(iterableResponse.stream().collect(Collectors.toList()).size(), iterableResponse.stream().collect(Collectors.toList()).size()); + + // ensure original list of values are same after calling iterator() + List originalIntegerList = Arrays.asList(2, 3, 4, 5, 6); + iterableResponse.stream().forEach(number -> Assert.assertTrue(originalIntegerList.contains(number))); + } + + /*Ensure that if we call iterator multiple times, it always returns same values and they are same as original list of values.*/ + @Test + public void testIterableResponseIteratorFromStart() { + IterableResponse iterableResponse = getIntegerIterableResponse(2, 5); + List actualNumberValues1 = new ArrayList<>(); + List actualNumberValues2 = new ArrayList<>(); + iterableResponse.iterator().forEachRemaining(number -> actualNumberValues1.add(number)); + iterableResponse.iterator().forEachRemaining(number -> actualNumberValues2.add(number)); + Assert.assertArrayEquals(actualNumberValues1.toArray(), actualNumberValues2.toArray()); + + // ensure original list of values are same after calling iterator() + List originalIntegerList = Arrays.asList(2, 3, 4, 5, 6); + iterableResponse.iterator().forEachRemaining(number -> Assert.assertTrue(originalIntegerList.contains(number))); + } + + private IterableResponse getIntegerIterableResponse(int startNumber, int noOfValues) { + Flux integerFlux = Flux.range(startNumber, noOfValues); + return new IterableResponse<>(integerFlux); + } +} diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java index 3faceb97827a..2c0bce8c7245 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/EnvironmentCredential.java @@ -32,7 +32,7 @@ public EnvironmentCredential() { * @param identityClientOptions the options for configuring the identity client */ public EnvironmentCredential(IdentityClientOptions identityClientOptions) { - this.configuration = ConfigurationManager.getConfiguration(); + this.configuration = ConfigurationManager.getConfiguration().clone(); this.identityClientOptions = identityClientOptions; } @@ -42,7 +42,7 @@ public Mono getToken(String... scopes) { if (configuration.contains(BaseConfigurations.AZURE_CLIENT_ID) && configuration.contains(BaseConfigurations.AZURE_CLIENT_SECRET) && configuration.contains(BaseConfigurations.AZURE_TENANT_ID)) { - // TODO: support other clouds + // TODO: support other clouds. return new ClientSecretCredential(identityClientOptions) .clientId(configuration.get(BaseConfigurations.AZURE_CLIENT_ID)) .clientSecret(configuration.get(BaseConfigurations.AZURE_CLIENT_SECRET)) diff --git a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java index 49aa98f54e3f..4f3ccce61ea4 100644 --- a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java +++ b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyAsyncClient.java @@ -97,8 +97,7 @@ public final class KeyAsyncClient { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createKey(String name, KeyType keyType) { - return withContext(context -> createKey(name, keyType, context)) - .flatMap(FluxUtil::toMono); + return withContext(context -> createKeyWithResponse(name, keyType, context)).flatMap(FluxUtil::toMono); } /** @@ -120,10 +119,10 @@ public Mono createKey(String name, KeyType keyType) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions) { - return withContext(context -> createKey(keyCreateOptions, context)); + return withContext(context -> createKeyWithResponse(keyCreateOptions, context)); } - Mono> createKey(String name, KeyType keyType, Context context) { + Mono> createKeyWithResponse(String name, KeyType keyType, Context context) { KeyRequestParameters parameters = new KeyRequestParameters().kty(keyType); return service.createKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Creating key - {}", name)) @@ -155,11 +154,10 @@ Mono> createKey(String name, KeyType keyType, Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createKey(KeyCreateOptions keyCreateOptions) { - return withContext(context -> createKeyWithResponse(keyCreateOptions)) - .flatMap(FluxUtil::toMono); + return createKeyWithResponse(keyCreateOptions).flatMap(FluxUtil::toMono); } - Mono> createKey(KeyCreateOptions keyCreateOptions, Context context) { + Mono> createKeyWithResponse(KeyCreateOptions keyCreateOptions, Context context) { Objects.requireNonNull(keyCreateOptions, "The key create options parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .kty(keyCreateOptions.keyType()) @@ -196,8 +194,7 @@ Mono> createKey(KeyCreateOptions keyCreateOptions, Context context */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { - return withContext(context -> createRsaKeyWithResponse(rsaKeyCreateOptions)) - .flatMap(FluxUtil::toMono); + return createRsaKeyWithResponse(rsaKeyCreateOptions).flatMap(FluxUtil::toMono); } /** @@ -221,10 +218,10 @@ public Mono createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions) { - return withContext(context -> createRsaKey(rsaKeyCreateOptions, context)); + return withContext(context -> createRsaKeyWithResponse(rsaKeyCreateOptions, context)); } - Mono> createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions, Context context) { + Mono> createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions, Context context) { Objects.requireNonNull(rsaKeyCreateOptions, "The Rsa key options parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .kty(rsaKeyCreateOptions.keyType()) @@ -262,8 +259,7 @@ Mono> createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions, Contex */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { - return withContext(context -> createEcKeyWithResponse(ecKeyCreateOptions)) - .flatMap(FluxUtil::toMono); + return createEcKeyWithResponse(ecKeyCreateOptions).flatMap(FluxUtil::toMono); } /** @@ -291,10 +287,10 @@ public Mono createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions) { - return withContext(context -> createEcKey(ecKeyCreateOptions, context)); + return withContext(context -> createEcKeyWithResponse(ecKeyCreateOptions, context)); } - Mono> createEcKey(EcKeyCreateOptions ecKeyCreateOptions, Context context) { + Mono> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions, Context context) { Objects.requireNonNull(ecKeyCreateOptions, "The Ec key options options cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .kty(ecKeyCreateOptions.keyType()) @@ -326,11 +322,10 @@ Mono> createEcKey(EcKeyCreateOptions ecKeyCreateOptions, Context c */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono importKey(String name, JsonWebKey keyMaterial) { - return withContext(context -> importKey(name, keyMaterial, context)) - .flatMap(FluxUtil::toMono); + return withContext(context -> importKeyWithResponse(name, keyMaterial, context)).flatMap(FluxUtil::toMono); } - Mono> importKey(String name, JsonWebKey keyMaterial, Context context) { + Mono> importKeyWithResponse(String name, JsonWebKey keyMaterial, Context context) { KeyImportRequestParameters parameters = new KeyImportRequestParameters().key(keyMaterial); return service.importKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Importing key - {}", name)) @@ -366,8 +361,7 @@ Mono> importKey(String name, JsonWebKey keyMaterial, Context conte */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono importKey(KeyImportOptions keyImportOptions) { - return withContext(context -> importKeyWithResponse(keyImportOptions)) - .flatMap(FluxUtil::toMono); + return importKeyWithResponse(keyImportOptions).flatMap(FluxUtil::toMono); } /** @@ -398,10 +392,10 @@ public Mono importKey(KeyImportOptions keyImportOptions) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> importKeyWithResponse(KeyImportOptions keyImportOptions) { - return withContext(context -> importKey(keyImportOptions, context)); + return withContext(context -> importKeyWithResponse(keyImportOptions, context)); } - Mono> importKey(KeyImportOptions keyImportOptions, Context context) { + Mono> importKeyWithResponse(KeyImportOptions keyImportOptions, Context context) { Objects.requireNonNull(keyImportOptions, "The key import configuration parameter cannot be null."); KeyImportRequestParameters parameters = new KeyImportRequestParameters() .key(keyImportOptions.keyMaterial()) @@ -430,12 +424,7 @@ Mono> importKey(KeyImportOptions keyImportOptions, Context context */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKey(String name, String version) { - if (version == null) { - return getKeyWithResponse(name) - .flatMap(FluxUtil::toMono); - } - return withContext(context -> getKeyWithResponse(name, version)) - .flatMap(FluxUtil::toMono); + return getKeyWithResponse(name, version).flatMap(FluxUtil::toMono); } /** @@ -455,13 +444,10 @@ public Mono getKey(String name, String version) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getKeyWithResponse(String name, String version) { - if (version == null) { - return getKeyWithResponse(name); - } - return withContext(context -> getKey(name, version, context)); + return withContext(context -> getKeyWithResponse(name, version == null ? "" : version, context)); } - Mono> getKey(String name, String version, Context context) { + Mono> getKeyWithResponse(String name, String version, Context context) { return service.getKey(endpoint, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Retrieving key - {}", name)) .doOnSuccess(response -> logger.info("Retrieved key - {}", response.value().name())) @@ -485,28 +471,7 @@ Mono> getKey(String name, String version, Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKey(String name) { - return getKeyWithResponse(name, "") - .flatMap(FluxUtil::toMono); - } - - /** - * Get the public part of the latest version of the specified key from the key vault. The get key operation is applicable to - * all key types and it requires the {@code keys/get} permission. - * - *

Code Samples

- *

Gets latest version of the key in the key vault. Subscribes to the call asynchronously and prints out the - * returned key details when a response has been received.

- * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#string} - * - * @param name The name of the key. - * @throws ResourceNotFoundException when a key with {@code name} doesn't exist in the key vault. - * @throws HttpRequestException if {@code name} is empty string. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the requested {@link Key key}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getKeyWithResponse(String name) { - return getKeyWithResponse(name, ""); + return getKeyWithResponse(name, "").flatMap(FluxUtil::toMono); } /** @@ -526,13 +491,7 @@ public Mono> getKeyWithResponse(String name) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getKey(KeyBase keyBase) { - Objects.requireNonNull(keyBase, "The Key Base parameter cannot be null."); - if (keyBase.version() == null) { - return getKeyWithResponse(keyBase.name()) - .flatMap(FluxUtil::toMono); - } - return getKeyWithResponse(keyBase.name(), keyBase.version()) - .flatMap(FluxUtil::toMono); + return getKeyWithResponse(keyBase).flatMap(FluxUtil::toMono); } /** @@ -553,10 +512,7 @@ public Mono getKey(KeyBase keyBase) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getKeyWithResponse(KeyBase keyBase) { Objects.requireNonNull(keyBase, "The Key Base parameter cannot be null."); - if (keyBase.version() == null) { - return getKeyWithResponse(keyBase.name()); - } - return getKeyWithResponse(keyBase.name(), keyBase.version()); + return withContext(context -> getKeyWithResponse(keyBase.name(), keyBase.version() == null ? "" : keyBase.version(), context)); } /** @@ -578,33 +534,10 @@ public Mono> getKeyWithResponse(KeyBase keyBase) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateKey(KeyBase key) { - return withContext(context -> updateKeyWithResponse(key)) - .flatMap(FluxUtil::toMono); - } - - /** - * Updates the attributes associated with the specified key, but not the cryptographic key material of the specified key in the key vault. The update - * operation changes specified attributes of an existing stored key and attributes that are not specified in the request are left unchanged. - * The cryptographic key material of a key itself cannot be changed. This operation requires the {@code keys/set} permission. - * - *

Code Samples

- *

Gets latest version of the key, changes its notBefore time and then updates it in the Azure Key Vault. Subscribes to the call asynchronously and prints out the - * returned key details when a response has been received.

- * - * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.updateKeyWithResponse#KeyBase} - * - * @param key The {@link KeyBase base key} object with updated properties. - * @throws NullPointerException if {@code key} is {@code null}. - * @throws ResourceNotFoundException when a key with {@link KeyBase#name() name} and {@link KeyBase#version() version} doesn't exist in the key vault. - * @throws HttpRequestException if {@link KeyBase#name() name} or {@link KeyBase#version() version} is empty string. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the {@link KeyBase updated key}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateKeyWithResponse(KeyBase key) { - return withContext(context -> updateKey(key, context)); + return withContext(context -> updateKeyWithResponse(key, context).flatMap(FluxUtil::toMono)); } - Mono> updateKey(KeyBase key, Context context) { + Mono> updateKeyWithResponse(KeyBase key, Context context) { Objects.requireNonNull(key, "The key input parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .tags(key.tags()) @@ -635,7 +568,7 @@ Mono> updateKey(KeyBase key, Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateKeyWithResponse(KeyBase key, KeyOperation... keyOperations) { - return withContext(context -> updateKey(key, context, keyOperations)); + return withContext(context -> updateKeyWithResponse(key, context, keyOperations)); } /** @@ -658,11 +591,10 @@ public Mono> updateKeyWithResponse(KeyBase key, KeyOperation... ke */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateKey(KeyBase key, KeyOperation... keyOperations) { - return withContext(context -> updateKeyWithResponse(key, keyOperations)) - .flatMap(FluxUtil::toMono); + return updateKeyWithResponse(key, keyOperations).flatMap(FluxUtil::toMono); } - Mono> updateKey(KeyBase key, Context context, KeyOperation... keyOperations) { + Mono> updateKeyWithResponse(KeyBase key, Context context, KeyOperation... keyOperations) { Objects.requireNonNull(key, "The key input parameter cannot be null."); KeyRequestParameters parameters = new KeyRequestParameters() .tags(key.tags()) @@ -694,8 +626,7 @@ Mono> updateKey(KeyBase key, Context context, KeyOperation... keyO */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteKey(String name) { - return withContext(context -> deleteKeyWithResponse(name)) - .flatMap(FluxUtil::toMono); + return deleteKeyWithResponse(name).flatMap(FluxUtil::toMono); } /** @@ -718,10 +649,10 @@ public Mono deleteKey(String name) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteKeyWithResponse(String name) { - return withContext(context -> deleteKey(name, context)); + return withContext(context -> deleteKeyWithResponse(name, context)); } - Mono> deleteKey(String name, Context context) { + Mono> deleteKeyWithResponse(String name, Context context) { return service.deleteKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Deleting key - {}", name)) .doOnSuccess(response -> logger.info("Deleted key - {}", response.value().name())) @@ -735,7 +666,6 @@ Mono> deleteKey(String name, Context context) { *

Code Samples

*

Gets the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the * deleted key details when a response has been received.

- *
      * //Assuming key is deleted on a soft-delete enabled vault.
      *
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getDeletedKey#string}
@@ -747,8 +677,7 @@ Mono> deleteKey(String name, Context context) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono getDeletedKey(String name) {
-        return withContext(context -> getDeletedKeyWithResponse(name))
-            .flatMap(FluxUtil::toMono);
+        return getDeletedKeyWithResponse(name).flatMap(FluxUtil::toMono);
     }
 
     /**
@@ -758,7 +687,6 @@ public Mono getDeletedKey(String name) {
      * 

Code Samples

*

Gets the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the * deleted key details when a response has been received.

- *
      * //Assuming key is deleted on a soft-delete enabled vault.
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.getDeletedKeyWithResponse#string}
      *
@@ -769,10 +697,10 @@ public Mono getDeletedKey(String name) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono> getDeletedKeyWithResponse(String name) {
-        return withContext(context -> getDeletedKey(name, context));
+        return withContext(context -> getDeletedKeyWithResponse(name, context));
     }
 
-    Mono> getDeletedKey(String name, Context context) {
+    Mono> getDeletedKeyWithResponse(String name, Context context) {
         return service.getDeletedKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Retrieving deleted key - {}",  name))
                 .doOnSuccess(response -> logger.info("Retrieved deleted key - {}", response.value().name()))
@@ -786,7 +714,6 @@ Mono> getDeletedKey(String name, Context context) {
      * 

Code Samples

*

Purges the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the * status code from the server response when a response has been received.

- *
      * //Assuming key is deleted on a soft-delete enabled vault.
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.purgeDeletedKey#string}
      *
@@ -815,7 +742,6 @@ Mono purgeDeletedKey(String name, Context context) {
      * 

Code Samples

*

Recovers the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the * recovered key details when a response has been received.

- *
      * //Assuming key is deleted on a soft-delete enabled vault.
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKey#string}
      *
@@ -826,8 +752,7 @@ Mono purgeDeletedKey(String name, Context context) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono recoverDeletedKey(String name) {
-        return withContext(context -> recoverDeletedKeyWithResponse(name))
-            .flatMap(FluxUtil::toMono);
+        return recoverDeletedKeyWithResponse(name).flatMap(FluxUtil::toMono);
     }
 
     /**
@@ -838,7 +763,6 @@ public Mono recoverDeletedKey(String name) {
      * 

Code Samples

*

Recovers the deleted key from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the * recovered key details when a response has been received.

- *
      * //Assuming key is deleted on a soft-delete enabled vault.
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.recoverDeletedKeyWithResponse#string}
      *
@@ -849,10 +773,10 @@ public Mono recoverDeletedKey(String name) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono> recoverDeletedKeyWithResponse(String name) {
-        return withContext(context -> recoverDeletedKey(name, context));
+        return withContext(context -> recoverDeletedKeyWithResponse(name, context));
     }
 
-    Mono> recoverDeletedKey(String name, Context context) {
+    Mono> recoverDeletedKeyWithResponse(String name, Context context) {
         return service.recoverDeletedKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Recovering deleted key - {}",  name))
                 .doOnSuccess(response -> logger.info("Recovered deleted key - {}", response.value().name()))
@@ -882,8 +806,7 @@ Mono> recoverDeletedKey(String name, Context context) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono backupKey(String name) {
-        return withContext(context -> backupKeyWithResponse(name))
-            .flatMap(FluxUtil::toMono);
+        return backupKeyWithResponse(name).flatMap(FluxUtil::toMono);
     }
 
     /**
@@ -909,10 +832,10 @@ public Mono backupKey(String name) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono> backupKeyWithResponse(String name) {
-        return withContext(context -> backupKey(name, context));
+        return withContext(context -> backupKeyWithResponse(name, context));
     }
 
-    Mono> backupKey(String name, Context context) {
+    Mono> backupKeyWithResponse(String name, Context context) {
         return service.backupKey(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Backing up key - {}",  name))
                 .doOnSuccess(response -> logger.info("Backed up key - {}", name))
@@ -933,7 +856,6 @@ Mono> backupKey(String name, Context context) {
      * 

Code Samples

*

Restores the key in the key vault from its backup. Subscribes to the call asynchronously and prints out the restored key * details when a response has been received.

- *
      * //Pass the Key Backup Byte array to the restore operation.
      *
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKey#byte}
@@ -944,8 +866,7 @@ Mono> backupKey(String name, Context context) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono restoreKey(byte[] backup) {
-        return withContext(context -> restoreKeyWithResponse(backup))
-            .flatMap(FluxUtil::toMono);
+        return restoreKeyWithResponse(backup).flatMap(FluxUtil::toMono);
     }
 
     /**
@@ -960,7 +881,6 @@ public Mono restoreKey(byte[] backup) {
      * 

Code Samples

*

Restores the key in the key vault from its backup. Subscribes to the call asynchronously and prints out the restored key * details when a response has been received.

- *
      * //Pass the Key Backup Byte array to the restore operation.
      *
      * {@codesnippet com.azure.security.keyvault.keys.async.keyclient.restoreKeyWithResponse#byte}
@@ -971,10 +891,10 @@ public Mono restoreKey(byte[] backup) {
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono> restoreKeyWithResponse(byte[] backup) {
-        return withContext(context -> restoreKey(backup, context));
+        return withContext(context -> restoreKeyWithResponse(backup, context));
     }
 
-    Mono> restoreKey(byte[] backup, Context context) {
+    Mono> restoreKeyWithResponse(byte[] backup, Context context) {
         KeyRestoreRequestParameters parameters = new KeyRestoreRequestParameters().keyBackup(backup);
         return service.restoreKey(endpoint, API_VERSION, parameters, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Attempting to restore key"))
diff --git a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java
index 517883dd328f..13653b711a1e 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClient.java
@@ -66,7 +66,7 @@ public final class KeyClient {
      * @return The {@link Key created key}.
      */
     public Key createKey(String name, KeyType keyType) {
-        return client.createKey(name, keyType, Context.NONE).block().value();
+        return client.createKeyWithResponse(name, keyType, Context.NONE).block().value();
     }
 
     /**
@@ -90,7 +90,7 @@ public Key createKey(String name, KeyType keyType) {
      * @return The {@link Key created key}.
      */
     public Key createKey(KeyCreateOptions keyCreateOptions) {
-        return this.createKeyWithResponse(keyCreateOptions, Context.NONE).value();
+        return createKeyWithResponse(keyCreateOptions, Context.NONE).value();
     }
 
     /**
@@ -115,7 +115,7 @@ public Key createKey(KeyCreateOptions keyCreateOptions) {
      * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key created key}.
      */
     public Response createKeyWithResponse(KeyCreateOptions keyCreateOptions, Context context) {
-        return client.createKey(keyCreateOptions, context).block();
+        return client.createKeyWithResponse(keyCreateOptions, context).block();
     }
 
     /**
@@ -140,7 +140,7 @@ public Response createKeyWithResponse(KeyCreateOptions keyCreateOptions, Co
      * @return The {@link Key created key}.
      */
     public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) {
-        return this.createKeyWithResponse(rsaKeyCreateOptions, Context.NONE).value();
+        return createRsaKeyWithResponse(rsaKeyCreateOptions, Context.NONE).value();
     }
 
     /**
@@ -156,7 +156,7 @@ public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) {
      *
      * 

Code Samples

*

Creates a new RSA key with size 2048 which activates in one day and expires in one year. Prints out the details of the created key.

- * {@codesnippet com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions} + * {@codesnippet com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context} * * @param rsaKeyCreateOptions The key options object containing information about the rsa key being created. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -166,7 +166,7 @@ public Key createRsaKey(RsaKeyCreateOptions rsaKeyCreateOptions) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key created key}. */ public Response createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOptions, Context context) { - return client.createRsaKey(rsaKeyCreateOptions, context).block(); + return client.createRsaKeyWithResponse(rsaKeyCreateOptions, context).block(); } /** @@ -192,7 +192,7 @@ public Response createRsaKeyWithResponse(RsaKeyCreateOptions rsaKeyCreateOp * @return The {@link Key created key}. */ public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { - return this.createEcKeyWithResponse(ecKeyCreateOptions, Context.NONE).value(); + return createEcKeyWithResponse(ecKeyCreateOptions, Context.NONE).value(); } /** @@ -209,7 +209,7 @@ public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { *

Code Samples

*

Creates a new EC key with P-384 web key curve. The key activates in one day and expires in one year. Prints out * the details of the created key.

- * {@codesnippet com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions} + * {@codesnippet com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context} * * @param ecKeyCreateOptions The key options object containing information about the ec key being created. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -219,7 +219,7 @@ public Key createEcKey(EcKeyCreateOptions ecKeyCreateOptions) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key created key}. */ public Response createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptions, Context context) { - return client.createEcKey(ecKeyCreateOptions, context).block(); + return client.createEcKeyWithResponse(ecKeyCreateOptions, context).block(); } /** @@ -239,7 +239,7 @@ public Response createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptio * @return The {@link Key imported key}. */ public Key importKey(String name, JsonWebKey keyMaterial) { - return client.importKey(name, keyMaterial, Context.NONE).block().value(); + return client.importKeyWithResponse(name, keyMaterial, Context.NONE).block().value(); } /** @@ -268,7 +268,7 @@ public Key importKey(String name, JsonWebKey keyMaterial) { * @return The {@link Key imported key}. */ public Key importKey(KeyImportOptions keyImportOptions) { - return this.importKeyWithResponse(keyImportOptions, Context.NONE).value(); + return importKeyWithResponse(keyImportOptions, Context.NONE).value(); } /** @@ -298,7 +298,7 @@ public Key importKey(KeyImportOptions keyImportOptions) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key imported key}. */ public Response importKeyWithResponse(KeyImportOptions keyImportOptions, Context context) { - return client.importKey(keyImportOptions, context).block(); + return client.importKeyWithResponse(keyImportOptions, context).block(); } /** @@ -315,7 +315,7 @@ public Response importKeyWithResponse(KeyImportOptions keyImportOptions, Co * @return The requested {@link Key key}. */ public Key getKey(String name, String version) { - return this.getKeyWithResponse(name, version, Context.NONE).value(); + return getKeyWithResponse(name, version, Context.NONE).value(); } /** @@ -333,7 +333,7 @@ public Key getKey(String name, String version) { * @return A {@link Response} whose {@link Response#value() value} contains the requested {@link Key key}. */ public Response getKeyWithResponse(String name, String version, Context context) { - return client.getKey(name, version, context).block(); + return client.getKeyWithResponse(name, version, context).block(); } /** @@ -350,7 +350,7 @@ public Response getKeyWithResponse(String name, String version, Context con * @return The requested {@link Key key}. */ public Key getKey(String name) { - return this.getKeyWithResponse(name, "", Context.NONE).value(); + return getKeyWithResponse(name, "", Context.NONE).value(); } /** @@ -368,11 +368,27 @@ public Key getKey(String name) { * @return The requested {@link Key key}. */ public Key getKey(KeyBase keyBase) { + return getKeyWithResponse(keyBase, Context.NONE).value(); + } + + /** + * Get public part of the key which represents {@link KeyBase keyBase} from the key vault. The get key operation is applicable + * to all key types and it requires the {@code keys/get} permission. + * + *

The list operations {@link KeyClient#listKeys()} and {@link KeyClient#listKeyVersions(String)} return + * the {@link List} containing {@link KeyBase base key} as output excluding the key material of the key. + * This operation can then be used to get the full key with its key material from {@code keyBase}.

+ * {@codesnippet com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyBase-Context} + * + * @param keyBase The {@link KeyBase base key} holding attributes of the key being requested. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a key with {@link KeyBase#name() name} and {@link KeyBase#version() version} doesn't exist in the key vault. + * @throws HttpRequestException if {@link KeyBase#name()} name} or {@link KeyBase#version() version} is empty string. + * @return A {@link Response} whose {@link Response#value() value} contains the requested {@link Key key}. + */ + public Response getKeyWithResponse(KeyBase keyBase, Context context) { Objects.requireNonNull(keyBase, "The Key Base parameter cannot be null."); - if (keyBase.version() == null) { - return getKey(keyBase.name()); - } - return getKeyWithResponse(keyBase.name(), keyBase.version(), Context.NONE).value(); + return client.getKeyWithResponse(keyBase.name(), keyBase.version() == null ? "" : keyBase.version(), context).block(); } /** @@ -391,7 +407,7 @@ public Key getKey(KeyBase keyBase) { * @return The {@link KeyBase updated key}. */ public Key updateKey(KeyBase key) { - return this.updateKeyWithResponse(key, Context.NONE).value(); + return client.updateKeyWithResponse(key, Context.NONE).block().value(); } /** @@ -411,7 +427,7 @@ public Key updateKey(KeyBase key) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link KeyBase updated key}. */ public Key updateKey(KeyBase key, KeyOperation... keyOperations) { - return this.updateKeyWithResponse(key, Context.NONE, keyOperations).value(); + return updateKeyWithResponse(key, Context.NONE, keyOperations).value(); } /** @@ -432,7 +448,7 @@ public Key updateKey(KeyBase key, KeyOperation... keyOperations) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link KeyBase updated key}. */ public Response updateKeyWithResponse(KeyBase key, Context context, KeyOperation... keyOperations) { - return client.updateKey(key, context, keyOperations).block(); + return client.updateKeyWithResponse(key, context, keyOperations).block(); } /** @@ -452,7 +468,7 @@ public Response updateKeyWithResponse(KeyBase key, Context context, KeyOpe * @return The {@link DeletedKey deleted key}. */ public DeletedKey deleteKey(String name) { - return this.deleteKeyWithResponse(name, Context.NONE).value(); + return deleteKeyWithResponse(name, Context.NONE).value(); } /** @@ -473,7 +489,7 @@ public DeletedKey deleteKey(String name) { * @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedKey deleted key}. */ public Response deleteKeyWithResponse(String name, Context context) { - return client.deleteKey(name, context).block(); + return client.deleteKeyWithResponse(name, context).block(); } /** @@ -483,7 +499,6 @@ public Response deleteKeyWithResponse(String name, Context context) *

Code Samples

*

Gets the deleted key from the key vault enabled for soft-delete. Prints out the details of the deleted key * returned in the response.

- *
      * //Assuming key is deleted on a soft-delete enabled key vault.
      * {@codesnippet com.azure.keyvault.keys.keyclient.getDeletedKey#string}
      * 
@@ -494,7 +509,7 @@ public Response deleteKeyWithResponse(String name, Context context) * @return The {@link DeletedKey deleted key}. */ public DeletedKey getDeletedKey(String name) { - return this.getDeletedKeyWithResponse(name, Context.NONE).value(); + return getDeletedKeyWithResponse(name, Context.NONE).value(); } /** @@ -504,7 +519,6 @@ public DeletedKey getDeletedKey(String name) { *

Code Samples

*

Gets the deleted key from the key vault enabled for soft-delete. Prints out the details of the deleted key * returned in the response.

- *
      * //Assuming key is deleted on a soft-delete enabled key vault.
      * {@codesnippet com.azure.keyvault.keys.keyclient.getDeletedKeyWithResponse#string-Context}
      *
@@ -515,7 +529,7 @@ public DeletedKey getDeletedKey(String name) {
      * @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedKey deleted key}.
      */
     public Response getDeletedKeyWithResponse(String name, Context context) {
-        return client.getDeletedKey(name, context).block();
+        return client.getDeletedKeyWithResponse(name, context).block();
     }
 
     /**
@@ -533,7 +547,7 @@ public Response getDeletedKeyWithResponse(String name, Context conte
      * @return A {@link VoidResponse}.
      */
     public VoidResponse purgeDeletedKey(String name) {
-        return client.purgeDeletedKey(name, Context.NONE).block();
+        return purgeDeletedKey(name, Context.NONE);
     }
 
     /**
@@ -571,7 +585,7 @@ public VoidResponse purgeDeletedKey(String name, Context context) {
      * @return The {@link Key recovered key}.
      */
     public Key recoverDeletedKey(String name) {
-        return this.recoverDeletedKeyWithResponse(name, Context.NONE).value();
+        return recoverDeletedKeyWithResponse(name, Context.NONE).value();
     }
 
     /**
@@ -591,7 +605,7 @@ public Key recoverDeletedKey(String name) {
      * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key recovered key}.
      */
     public Response recoverDeletedKeyWithResponse(String name, Context context) {
-        return client.recoverDeletedKey(name, context).block();
+        return client.recoverDeletedKeyWithResponse(name, context).block();
     }
 
     /**
@@ -614,7 +628,7 @@ public Response recoverDeletedKeyWithResponse(String name, Context context)
      * @return The backed up key blob.
      */
     public byte[] backupKey(String name) {
-        return this.backupKeyWithResponse(name, Context.NONE).value();
+        return backupKeyWithResponse(name, Context.NONE).value();
     }
 
     /**
@@ -638,7 +652,7 @@ public byte[] backupKey(String name) {
      * @return A {@link Response} whose {@link Response#value() value} contains the backed up key blob.
      */
     public Response backupKeyWithResponse(String name, Context context) {
-        return client.backupKey(name, context).block();
+        return client.backupKeyWithResponse(name, context).block();
     }
 
     /**
@@ -660,7 +674,7 @@ public Response backupKeyWithResponse(String name, Context context) {
      * @return The {@link Key restored key}.
      */
     public Key restoreKey(byte[] backup) {
-        return this.restoreKeyWithResponse(backup, Context.NONE).value();
+        return restoreKeyWithResponse(backup, Context.NONE).value();
     }
 
     /**
@@ -683,7 +697,7 @@ public Key restoreKey(byte[] backup) {
      * @return A {@link Response} whose {@link Response#value() value} contains the {@link Key restored key}.
      */
     public Response restoreKeyWithResponse(byte[] backup, Context context) {
-        return client.restoreKey(backup, context).block();
+        return client.restoreKeyWithResponse(backup, context).block();
     }
 
     /**
@@ -698,7 +712,7 @@ public Response restoreKeyWithResponse(byte[] backup, Context context) {
      * @return A {@link List} containing {@link KeyBase key} of all the keys in the vault.
      */
     public Iterable listKeys() {
-        return client.listKeys(Context.NONE).toIterable();
+        return listKeys(Context.NONE);
     }
 
     /**
@@ -729,7 +743,7 @@ public Iterable listKeys(Context context) {
      * @return A {@link List} containing all of the {@link DeletedKey deleted keys} in the vault.
      */
     public Iterable listDeletedKeys() {
-        return client.listDeletedKeys().toIterable();
+        return listDeletedKeys(Context.NONE);
     }
 
     /**
@@ -763,7 +777,7 @@ public Iterable listDeletedKeys(Context context) {
      * @return A {@link List} containing {@link KeyBase key} of all the versions of the specified key in the vault. List is empty if key with {@code name} does not exist in key vault.
      */
     public Iterable listKeyVersions(String name) {
-        return client.listKeyVersions(name).toIterable();
+        return listKeyVersions(name, Context.NONE);
     }
 
     /**
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java
index 50b5e387cf02..954b5e27d6be 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorld.java
@@ -3,6 +3,8 @@
 
 package com.azure.security.keyvault.keys;
 
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
 import com.azure.identity.credential.DefaultAzureCredential;
 import com.azure.security.keyvault.keys.models.Key;
 import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions;
@@ -33,9 +35,12 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum
 
         // Let's create a Rsa key valid for 1 year. if the key
         // already exists in the key vault, then a new version of the key is created.
-        keyClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey")
-                .expires(OffsetDateTime.now().plusYears(1))
-                .keySize(2048));
+        Response createKeyResponse = keyClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey")
+                                                                                 .expires(OffsetDateTime.now().plusYears(1))
+                                                                                 .keySize(2048), new Context("key1", "value1"));
+
+        // Let's validate create key operation succeeded using the status code information in the response.
+        System.out.printf("Create Key operation succeeded with status code %s \n", createKeyResponse.statusCode());
 
         // Let's Get the Cloud Rsa Key from the key vault.
         Key cloudRsaKey = keyClient.getKey("CloudRsaKey");
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java
index 922548455aec..7dddc982ca9d 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/HelloWorldAsync.java
@@ -3,9 +3,11 @@
 
 package com.azure.security.keyvault.keys;
 
+import com.azure.core.http.rest.Response;
 import com.azure.identity.credential.DefaultAzureCredential;
 import com.azure.security.keyvault.keys.models.Key;
 import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions;
+import reactor.core.Disposable;
 
 import java.time.OffsetDateTime;
 
@@ -32,11 +34,13 @@ public static void main(String[] args) throws InterruptedException {
 
         // Let's create Cloud Rsa key valid for 1 year. if the key
         // already exists in the key vault, then a new version of the key is created.
-        keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey")
-                .expires(OffsetDateTime.now().plusYears(1))
-                .keySize(2048))
-                .subscribe(keyResponse ->
-                        System.out.printf("Key is created with name %s and type %s \n", keyResponse.name(), keyResponse.keyMaterial().kty()));
+        Response createKeyResponse = keyAsyncClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey")
+                                                                                                .expires(OffsetDateTime.now().plusYears(1))
+                                                                                                .keySize(2048)).block();
+
+        // Let's validate create key operation succeeded using the status code information in the response.
+        System.out.printf("Create Key operation succeeded with status code %s \n", createKeyResponse.statusCode());
+        System.out.printf("Key is created with name %s and type %s \n", createKeyResponse.value().name(), createKeyResponse.value().keyMaterial().kty());
 
         Thread.sleep(2000);
 
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java
index 12eacca66a16..1ecb1479fd7f 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java
@@ -12,7 +12,6 @@
 import com.azure.core.test.policy.RecordNetworkCallPolicy;
 import com.azure.identity.credential.DefaultAzureCredential;
 import com.azure.security.keyvault.keys.models.EcKeyCreateOptions;
-import com.azure.security.keyvault.keys.models.Key;
 import com.azure.security.keyvault.keys.models.KeyBase;
 import com.azure.security.keyvault.keys.models.KeyCreateOptions;
 import com.azure.security.keyvault.keys.models.RsaKeyCreateOptions;
@@ -209,14 +208,6 @@ public void getKeyWithResponseSnippets() {
                     keyResponse.value().name(), keyResponse.value().id()));
         // END: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#string-string
 
-        // BEGIN: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#string
-        keyAsyncClient.getKeyWithResponse("keyName")
-            .subscriberContext(Context.of(key1, value1, key2, value2))
-            .subscribe(keyResponse ->
-                System.out.printf("Key is created with name %s and id %s \n",
-                    keyResponse.value().name(), keyResponse.value().id()));
-        // END: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#string
-
         // BEGIN: com.azure.security.keyvault.keys.async.keyclient.getKeyWithResponse#KeyBase
         keyAsyncClient.listKeys().subscribe(keyBase ->
             keyAsyncClient.getKeyWithResponse(keyBase)
@@ -263,12 +254,11 @@ public void updateKeyWithResponseSnippets() {
         KeyAsyncClient keyAsyncClient = createAsyncClient();
 
         // BEGIN: com.azure.security.keyvault.keys.async.keyclient.updateKeyWithResponse#KeyBase-keyOperations
-        keyAsyncClient.getKeyWithResponse("keyName")
+        keyAsyncClient.getKey("keyName")
             .subscribe(keyResponse  -> {
-                Key key = keyResponse.value();
                 //Update the not before time of the key.
-                key.notBefore(OffsetDateTime.now().plusDays(50));
-                keyAsyncClient.updateKeyWithResponse(key, KeyOperation.ENCRYPT, KeyOperation.DECRYPT)
+                keyResponse.notBefore(OffsetDateTime.now().plusDays(50));
+                keyAsyncClient.updateKeyWithResponse(keyResponse, KeyOperation.ENCRYPT, KeyOperation.DECRYPT)
                     .subscriberContext(Context.of(key1, value1, key2, value2))
                     .subscribe(updatedKeyResponse  ->
                         System.out.printf("Key's updated not before time %s \n",
@@ -277,12 +267,11 @@ public void updateKeyWithResponseSnippets() {
         // END: com.azure.security.keyvault.keys.async.keyclient.updateKeyWithResponse#KeyBase-keyOperations
 
         // BEGIN: com.azure.security.keyvault.keys.async.keyclient.updateKeyWithResponse#KeyBase
-        keyAsyncClient.getKeyWithResponse("keyName")
+        keyAsyncClient.getKey("keyName")
             .subscribe(keyResponse  -> {
-                Key key = keyResponse.value();
                 //Update the not before time of the key.
-                key.notBefore(OffsetDateTime.now().plusDays(50));
-                keyAsyncClient.updateKeyWithResponse(key)
+                keyResponse.notBefore(OffsetDateTime.now().plusDays(50));
+                keyAsyncClient.updateKeyWithResponse(keyResponse)
                     .subscriberContext(Context.of(key1, value1, key2, value2))
                     .subscribe(updatedKeyResponse  ->
                         System.out.printf("Key's updated not before time %s \n",
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java
index c2e2caedfee1..6288ff490aa5 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java
@@ -4,10 +4,6 @@
 package com.azure.security.keyvault.keys;
 
 import com.azure.core.credentials.TokenCredential;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.HttpLogDetailLevel;
 import com.azure.core.http.rest.Response;
 import com.azure.core.http.rest.VoidResponse;
 import com.azure.core.util.Context;
@@ -123,23 +119,23 @@ public void createKeyWithResponses() {
         System.out.printf("Key is created with name %s and id %s \n", optionsKey.name(), optionsKey.id());
         // END: com.azure.keyvault.keys.keyclient.createKeyWithResponse#keyCreateOptions-Context
 
-        // BEGIN: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions
+        // BEGIN: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context
         RsaKeyCreateOptions rsaKeyCreateOptions = new RsaKeyCreateOptions("keyName")
             .keySize(2048)
             .notBefore(OffsetDateTime.now().plusDays(1))
             .expires(OffsetDateTime.now().plusYears(1));
         Key rsaKey = keyClient.createRsaKeyWithResponse(rsaKeyCreateOptions, new Context(key1, value1)).value();
         System.out.printf("Key is created with name %s and id %s \n", rsaKey.name(), rsaKey.id());
-        // END: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions
+        // END: com.azure.keyvault.keys.keyclient.createRsaKeyWithResponse#keyOptions-Context
 
-        // BEGIN: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions
+        // BEGIN: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context
         EcKeyCreateOptions ecKeyCreateOptions = new EcKeyCreateOptions("keyName")
             .curve(KeyCurveName.P_384)
             .notBefore(OffsetDateTime.now().plusDays(1))
             .expires(OffsetDateTime.now().plusYears(1));
         Key ecKey = keyClient.createEcKeyWithResponse(ecKeyCreateOptions, new Context(key1, value1)).value();
         System.out.printf("Key is created with name %s and id %s \n", ecKey.name(), ecKey.id());
-        // END: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions
+        // END: com.azure.keyvault.keys.keyclient.createEcKeyWithResponse#keyOptions-Context
     }
 
     /**
@@ -153,6 +149,14 @@ public void getKeyWithResponseSnippets() {
             new Context(key1, value1)).value();
         System.out.printf("Key is returned with name %s and id %s \n", keyWithVersion.name(), keyWithVersion.id());
         // END: com.azure.keyvault.keys.keyclient.getKeyWithResponse#string-string-Context
+
+        // BEGIN: com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyBase-Context
+        for (KeyBase key : keyClient.listKeys()) {
+            Key keyResponse = keyClient.getKeyWithResponse(key, new Context(key1, value1)).value();
+            System.out.printf("Received key with name %s and type %s", keyResponse.name(),
+                keyResponse.keyMaterial().kty());
+        }
+        // END: com.azure.keyvault.keys.keyclient.getKeyWithResponse#KeyBase-Context
     }
 
     /**
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java
index 35ab9c7b1902..74ff3fa9fbcf 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/ListOperationsAsync.java
@@ -39,10 +39,10 @@ public static void main(String[] args) throws InterruptedException {
 
         Thread.sleep(2000);
 
-        keyAsyncClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey")
+        keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey")
                 .expires(OffsetDateTime.now().plusYears(1)))
                 .subscribe(keyResponse ->
-                        System.out.printf("Key is created with name %s and type %s \n", keyResponse.value().name(), keyResponse.value().keyMaterial().kty()));
+                        System.out.printf("Key is created with name %s and type %s \n", keyResponse.name(), keyResponse.keyMaterial().kty()));
 
         Thread.sleep(2000);
 
diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
index 836e32d0ebfc..af394d45d880 100644
--- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
+++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
@@ -13,6 +13,7 @@
 import com.azure.core.implementation.annotation.ReturnType;
 import com.azure.core.implementation.annotation.ServiceClient;
 import com.azure.core.implementation.annotation.ServiceMethod;
+import com.azure.core.implementation.util.FluxUtil;
 import com.azure.core.util.Context;
 import com.azure.core.util.logging.ClientLogger;
 import com.azure.security.keyvault.secrets.models.DeletedSecret;
@@ -36,7 +37,7 @@
  * also supports listing {@link DeletedSecret deleted secrets} for a soft-delete enabled Azure Key Vault.
  *
  * 

Samples to construct the async client

- * {@codesnippet com.azure.security.keyvault.secretclient.async.construct} + * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.construct} * * @see SecretClientBuilder * @see PagedFlux @@ -76,14 +77,31 @@ public final class SecretAsyncClient { *

Code Samples

*

Creates a new secret which activates in 1 day and expires in 1 year in the Azure Key Vault. Subscribes to the call asynchronously and * prints out the newly created secret details when a response is received.

- *
-     * Secret secret = new Secret("secretName", "secretValue")
-     *   .notBefore(OffsetDateTime.now().plusDays(1))
-     *   .expires(OffsetDateTime.now().plusDays(365));
+     * {@codesnippet com.azure.keyvault.secrets.secretclient.setSecret#secret}
      *
-     * secretAsyncClient.setSecret(secret).subscribe(secretResponse ->
-     *   System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value()));
-     * 
+ * @param secret The Secret object containing information about the secret and its properties. The properties secret.name and secret.value must be non null. + * @throws NullPointerException if {@code secret} is {@code null}. + * @throws ResourceModifiedException if {@code secret} is malformed. + * @throws HttpRequestException if {@link Secret#name() name} or {@link Secret#value() value} is empty string. + * @return A {@link Mono} containing the {@link Secret created secret}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setSecret(Secret secret) { + return setSecretWithResponse(secret).flatMap(FluxUtil::toMono); + } + + /** + * The set operation adds a secret to the key vault. If the named secret already exists, Azure Key Vault creates + * a new version of that secret. This operation requires the {@code secrets/set} permission. + * + *

The {@link Secret} is required. The {@link Secret#expires() expires}, {@link Secret#contentType() contentType} and + * {@link Secret#notBefore() notBefore} values in {@code secret} are optional. The {@link Secret#enabled() enabled} field is + * set to true by key vault, if not specified.

+ * + *

Code Samples

+ *

Creates a new secret which activates in 1 day and expires in 1 year in the Azure Key Vault. Subscribes to the call asynchronously and + * prints out the newly created secret details when a response is received.

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.setSecretWithResponse#secret} * * @param secret The Secret object containing information about the secret and its properties. The properties secret.name and secret.value must be non null. * @throws NullPointerException if {@code secret} is {@code null}. @@ -92,11 +110,11 @@ public final class SecretAsyncClient { * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the {@link Secret created secret}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setSecret(Secret secret) { - return withContext(context -> setSecret(secret, context)); + public Mono> setSecretWithResponse(Secret secret) { + return withContext(context -> setSecretWithResponse(secret, context)); } - Mono> setSecret(Secret secret, Context context) { + Mono> setSecretWithResponse(Secret secret, Context context) { Objects.requireNonNull(secret, "The Secret input parameter cannot be null."); SecretRequestParameters parameters = new SecretRequestParameters() .value(secret.value()) @@ -118,24 +136,20 @@ Mono> setSecret(Secret secret, Context context) { *

Code Samples

*

Creates a new secret in the key vault. Subscribes to the call asynchronously and prints out * the newly created secret details when a response is received.

- *
-     * secretAsyncClient.setSecret("secretName", "secretValue").subscribe(secretResponse ->
-     *   System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.setSecret#string-string} * * @param name The name of the secret. It is required and cannot be null. * @param value The value of the secret. It is required and cannot be null. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} - * contains the {@link Secret created secret}. + * @return A {@link Mono} containing the {@link Secret created secret}. * @throws ResourceModifiedException if invalid {@code name} or {@code value} are specified. * @throws HttpRequestException if {@code name} or {@code value} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setSecret(String name, String value) { - return withContext(context -> setSecret(name, value, context)); + public Mono setSecret(String name, String value) { + return withContext(context -> setSecretWithResponse(name, value, context)).flatMap(FluxUtil::toMono); } - Mono> setSecret(String name, String value, Context context) { + Mono> setSecretWithResponse(String name, String value, Context context) { SecretRequestParameters parameters = new SecretRequestParameters().value(value); return service.setSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Setting secret - {}", name)) @@ -152,12 +166,33 @@ Mono> setSecret(String name, String value, Context context) { *

Gets a specific version of the secret in the key vault. Subscribes to the call * asynchronously and prints out the * returned secret details when a response is received.

- *
-     * String secretVersion = "6A385B124DEF4096AF1361A85B16C204";
-     * secretAsyncClient.getSecret("secretName", secretVersion).subscribe(secretResponse ->
-     *   System.out.printf("Secret with name %s, value %s and version %s", secretResponse.value().name(),
-     *   secretResponse.value().value(), secretResponse.value().version()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecret#string-string} + * + * @param name The name of the secret, cannot be null + * @param version The version of the secret to retrieve. If this is an empty String or null, this + * call is equivalent to calling {@link #getSecret(String)}, with the latest version being + * retrieved. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} + * contains the requested {@link Secret secret}. + * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't + * exist in the key vault. + * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSecret(String name, String version) { + return getSecretWithResponse(name, version).flatMap(FluxUtil::toMono); + } + + /** + * Get the specified secret with specified version from the key vault. The get operation is + * applicable to any secret stored in Azure Key Vault. This operation requires the {@code + * secrets/get} permission. + * + *

Code Samples

+ *

Gets a specific version of the secret in the key vault. Subscribes to the call + * asynchronously and prints out the + * returned secret details when a response is received.

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecretWithResponse#string-string} * * @param name The name of the secret, cannot be null * @param version The version of the secret to retrieve. If this is an empty String or null, this @@ -170,19 +205,40 @@ Mono> setSecret(String name, String value, Context context) { * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSecret(String name, String version) { - return withContext(context -> getSecret(name, version, context)); + public Mono> getSecretWithResponse(String name, String version) { + return withContext(context -> getSecretWithResponse(name, version, context)); } - Mono> getSecret(String name, String version, Context context) { - if (version == null) { - return getSecret(name); - } + Mono> getSecretWithResponse(String name, String version, Context context) { + return service.getSecret(endpoint, name, version == null ? "" : version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .doOnRequest(ignoredValue -> logger.info("Retrieving secret - {}", name)) + .doOnSuccess(response -> logger.info("Retrieved secret - {}", response.value().name())) + .doOnError(error -> logger.warning("Failed to get secret - {}", name, error)); + } - return service.getSecret(endpoint, name, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) - .doOnRequest(ignoredValue -> logger.info("Retrieving secret - {}", name)) - .doOnSuccess(response -> logger.info("Retrieved secret - {}", response.value().name())) - .doOnError(error -> logger.warning("Failed to get secret - {}", name, error)); + /** + * Get the secret which represents {@link SecretBase secretBase} from the key vault. The get + * operation is applicable to any secret stored in Azure Key Vault. This operation requires the + * {@code secrets/get} permission. + * + *

The list operations {@link SecretAsyncClient#listSecrets()} and {@link + * SecretAsyncClient#listSecretVersions(String)} return + * the {@link Flux} containing {@link SecretBase base secret} as output. This operation can then be used to get + * the full secret with its value from {@code secretBase}.

+ *

Code Samples

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecret#secretBase} + * + * @param secretBase The {@link SecretBase base secret} secret base holding attributes of the + * secret being requested. + * @return A {@link Mono} containing the requested {@link Secret secret}. + * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link + * SecretBase#version() version} doesn't exist in the key vault. + * @throws HttpRequestException if {@link SecretBase#name()} name} or {@link SecretBase#version() + * version} is empty string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSecret(SecretBase secretBase) { + return getSecretWithResponse(secretBase).flatMap(FluxUtil::toMono); } /** @@ -195,11 +251,7 @@ Mono> getSecret(String name, String version, Context context) { * the {@link Flux} containing {@link SecretBase base secret} as output. This operation can then be used to get * the full secret with its value from {@code secretBase}.

*

Code Samples

- *
-     * secretAsyncClient.listSecrets().subscribe(secretBase ->
-     *     client.getSecret(secretBase).subscribe(secretResponse ->
-     *       System.out.printf("Secret with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretBase} * * @param secretBase The {@link SecretBase base secret} secret base holding attributes of the * secret being requested. @@ -211,21 +263,15 @@ Mono> getSecret(String name, String version, Context context) { * version} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSecret(SecretBase secretBase) { - Objects.requireNonNull(secretBase, "The Secret Base parameter cannot be null."); - if (secretBase.version() == null) { - return getSecret(secretBase.name()); - } - return getSecret(secretBase.name(), secretBase.version()); + public Mono> getSecretWithResponse(SecretBase secretBase) { + return withContext(context -> getSecretWithResponse(secretBase, context)); } - Mono> getSecret(SecretBase secretBase, Context context) { + Mono> getSecretWithResponse(SecretBase secretBase, Context context) { Objects.requireNonNull(secretBase, "The Secret Base parameter cannot be null."); - if (secretBase.version() == null) { - return getSecret(secretBase.name(), context); - } - return getSecret(secretBase.name(), secretBase.version(), context); + return getSecretWithResponse(secretBase.name(), secretBase.version() == null ? "" : secretBase.version(), context); } + /** * Get the latest version of the specified secret from the key vault. The get operation is applicable to any secret stored in Azure Key Vault. * This operation requires the {@code secrets/get} permission. @@ -233,24 +279,39 @@ Mono> getSecret(SecretBase secretBase, Context context) { *

Code Samples

*

Gets latest version of the secret in the key vault. Subscribes to the call asynchronously and prints out the * returned secret details when a response is received.

- *
-     * secretAsyncClient.getSecret("secretName").subscribe(secretResponse ->
-     *   System.out.printf("Secret with name %s , value %s \n", secretResponse.value().name(),
-     *   secretResponse.value().value()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getSecret#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the requested {@link Secret secret}. + * @return A {@link Mono} containing the requested {@link Secret secret}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSecret(String name) { - return getSecret(name, ""); + public Mono getSecret(String name) { + return getSecretWithResponse(name, "").flatMap(FluxUtil::toMono); } - Mono> getSecret(String name, Context context) { - return getSecret(name, "", context); + /** + * Updates the attributes associated with the specified secret, but not the value of the specified secret in the key vault. The update + * operation changes specified attributes of an existing stored secret and attributes that are not specified in the request are left unchanged. + * The value of a secret itself cannot be changed. This operation requires the {@code secrets/set} permission. + * + *

Code Samples

+ *

Gets latest version of the secret, changes its notBefore time and then updates it in the Azure Key Vault. Subscribes to the call asynchronously and prints out the + * returned secret details when a response is received.

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.updateSecret#secretBase} + * + *

The {@code secret} is required and its fields {@link SecretBase#name() name} and {@link SecretBase#version() version} cannot be null.

+ * + * @param secret The {@link SecretBase base secret} object with updated properties. + * @throws NullPointerException if {@code secret} is {@code null}. + * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link SecretBase#version() version} doesn't exist in the key vault. + * @throws HttpRequestException if {@link SecretBase#name()} name} or {@link SecretBase#version() version} is empty string. + * @return A {@link Mono} containing the {@link SecretBase updated secret}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateSecret(SecretBase secret) { + return updateSecretWithResponse(secret).flatMap(FluxUtil::toMono); } /** @@ -261,15 +322,8 @@ Mono> getSecret(String name, Context context) { *

Code Samples

*

Gets latest version of the secret, changes its notBefore time and then updates it in the Azure Key Vault. Subscribes to the call asynchronously and prints out the * returned secret details when a response is received.

- *
-     * secretAsyncClient.getSecret("secretName").subscribe(secretResponse -> {
-     *     Secret secret = secretResponse.value();
-     *     //Update the not before time of the secret.
-     *     secret.notBefore(OffsetDateTime.now().plusDays(50));
-     *     secretAsyncClient.updateSecret(secret).subscribe(secretResponse ->
-     *         System.out.printf("Secret's updated not before time %s \n", secretResponse.value().notBefore().toString()));
-     *   });
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.updateSecretWithResponse#secretBase} + * *

The {@code secret} is required and its fields {@link SecretBase#name() name} and {@link SecretBase#version() version} cannot be null.

* * @param secret The {@link SecretBase base secret} object with updated properties. @@ -279,11 +333,11 @@ Mono> getSecret(String name, Context context) { * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the {@link SecretBase updated secret}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSecret(SecretBase secret) { - return withContext(context -> updateSecret(secret, context)); + public Mono> updateSecretWithResponse(SecretBase secret) { + return withContext(context -> updateSecretWithResponse(secret, context)); } - Mono> updateSecret(SecretBase secret, Context context) { + Mono> updateSecretWithResponse(SecretBase secret, Context context) { Objects.requireNonNull(secret, "The secret input parameter cannot be null."); SecretRequestParameters parameters = new SecretRequestParameters() .tags(secret.tags()) @@ -304,10 +358,27 @@ Mono> updateSecret(SecretBase secret, Context context) { *

Code Samples

*

Deletes the secret in the Azure Key Vault. Subscribes to the call asynchronously and prints out the * deleted secret details when a response is received.

- *
-     * secretAsyncClient.deleteSecret("secretName").subscribe(deletedSecretResponse ->
-     *   System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.deleteSecret#string} + * + * @param name The name of the secret to be deleted. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link Mono} containing the {@link DeletedSecret deleted secret}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteSecret(String name) { + return deleteSecretWithResponse(name).flatMap(FluxUtil::toMono); + } + + /** + * Deletes a secret from the key vault. If soft-delete is enabled on the key vault then the secret is placed in the deleted state + * and requires to be purged for permanent deletion else the secret is permanently deleted. The delete operation applies to any secret stored in Azure Key Vault but + * it cannot be applied to an individual version of a secret. This operation requires the {@code secrets/delete} permission. + * + *

Code Samples

+ *

Deletes the secret in the Azure Key Vault. Subscribes to the call asynchronously and prints out the + * deleted secret details when a response is received.

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string} * * @param name The name of the secret to be deleted. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. @@ -315,11 +386,11 @@ Mono> updateSecret(SecretBase secret, Context context) { * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the {@link DeletedSecret deleted secret}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteSecret(String name) { - return withContext(context -> deleteSecret(name, context)); + public Mono> deleteSecretWithResponse(String name) { + return withContext(context -> deleteSecretWithResponse(name, context)); } - Mono> deleteSecret(String name, Context context) { + Mono> deleteSecretWithResponse(String name, Context context) { return service.deleteSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Deleting secret - {}", name)) .doOnSuccess(response -> logger.info("Deleted secret - {}", response.value().name())) @@ -336,9 +407,30 @@ Mono> deleteSecret(String name, Context context) { * deleted secret details when a response is received.

*
      * //Assuming secret is deleted on a soft-delete enabled vault.
-     * secretAsyncClient.getDeletedSecret("secretName").subscribe(deletedSecretResponse ->
-     *   System.out.printf("Deleted Secret with recovery Id %s \n", deletedSecretResponse.value().recoveryId()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.getDeletedSecret#string} + * + * @param name The name of the deleted secret. + * @return A {@link Mono} containing the {@link DeletedSecret deleted secret}. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key + * vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDeletedSecret(String name) { + return getDeletedSecretWithResponse(name).flatMap(FluxUtil::toMono); + } + + /** + * The get deleted secret operation returns the secrets that have been deleted for a vault enabled + * for soft-delete. This operation requires the {@code secrets/list} permission. + * + *

Code Samples

+ *

Gets the deleted secret from the key vault enabled for soft-delete. Subscribes to the call + * asynchronously and prints out the + * deleted secret details when a response is received.

+ *
+     * //Assuming secret is deleted on a soft-delete enabled vault.
+     * {@codesnippet com.azure.keyvault.secrets.secretclient.getDeletedSecretWithResponse#string}
      *
      * @param name The name of the deleted secret.
      * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value}
@@ -348,11 +440,11 @@ Mono> deleteSecret(String name, Context context) {
      * @throws HttpRequestException when a secret with {@code name} is empty string.
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
-    public Mono> getDeletedSecret(String name) {
-        return withContext(context -> getDeletedSecret(name, context));
+    public Mono> getDeletedSecretWithResponse(String name) {
+        return withContext(context -> getDeletedSecretWithResponse(name, context));
     }
 
-    Mono> getDeletedSecret(String name, Context context) {
+    Mono> getDeletedSecretWithResponse(String name, Context context) {
         return service.getDeletedSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Retrieving deleted secret - {}", name))
                 .doOnSuccess(response -> logger.info("Retrieved deleted secret - {}", response.value().name()))
@@ -370,9 +462,7 @@ Mono> getDeletedSecret(String name, Context context) {
      * status code from the server response when a response is received.

*
      * //Assuming secret is deleted on a soft-delete enabled vault.
-     * secretAsyncClient.purgeDeletedSecret("deletedSecretName").subscribe(purgeResponse ->
-     *   System.out.printf("Purge Status response %d \n", purgeResponse.statusCode()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.purgeDeletedSecret#string} * * @param name The name of the secret. * @return A {@link Mono} containing a {@link VoidResponse}. @@ -401,9 +491,28 @@ Mono purgeDeletedSecret(String name, Context context) { * recovered secret details when a response is received.

*
      * //Assuming secret is deleted on a soft-delete enabled vault.
-     * secretAsyncClient.recoverDeletedSecret("deletedSecretName").subscribe(recoveredSecretResponse ->
-     *   System.out.printf("Recovered Secret with name %s \n", recoveredSecretResponse.value().name()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string} + * + * @param name The name of the deleted secret to be recovered. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link Mono} containing the {@link Secret recovered secret}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recoverDeletedSecret(String name) { + return recoverDeletedSecretWithResponse(name).flatMap(FluxUtil::toMono); + } + + /** + * Recovers the deleted secret in the key vault to its latest version and can only be performed on a soft-delete enabled vault. + * This operation requires the {@code secrets/recover} permission. + * + *

Code Samples

+ *

Recovers the deleted secret from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the + * recovered secret details when a response is received.

+ *
+     * //Assuming secret is deleted on a soft-delete enabled vault.
+     * {@codesnippet com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string}
      *
      * @param name The name of the deleted secret to be recovered.
      * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault.
@@ -411,11 +520,11 @@ Mono purgeDeletedSecret(String name, Context context) {
      * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} contains the {@link Secret recovered secret}.
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
-    public Mono> recoverDeletedSecret(String name) {
-        return withContext(context -> recoverDeletedSecret(name, context));
+    public Mono> recoverDeletedSecretWithResponse(String name) {
+        return withContext(context -> recoverDeletedSecretWithResponse(name, context));
     }
 
-    Mono> recoverDeletedSecret(String name, Context context) {
+    Mono> recoverDeletedSecretWithResponse(String name, Context context) {
         return service.recoverDeletedSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Recovering deleted secret - {}", name))
                 .doOnSuccess(response -> logger.info("Recovered deleted secret - {}", response.value().name()))
@@ -431,9 +540,28 @@ Mono> recoverDeletedSecret(String name, Context context) {
      * the
      * length of the secret's backup byte array returned in the response.

*
-     * secretAsyncClient.backupSecret("secretName").subscribe(secretBackupResponse ->
-     *   System.out.printf("Secret's Backup Byte array's length %s \n", secretBackupResponse.value().length));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.backupSecret#string} + * + * @param name The name of the secret. + * @return A {@link Mono} containing the backed up secret blob. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key + * vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono backupSecret(String name) { + return backupSecretWithResponse(name).flatMap(FluxUtil::toMono); + } + + /** + * Requests a backup of the specified secret be downloaded to the client. All versions of the + * secret will be downloaded. This operation requires the {@code secrets/backup} permission. + * + *

Code Samples

+ *

Backs up the secret from the key vault. Subscribes to the call asynchronously and prints out + * the + * length of the secret's backup byte array returned in the response.

+ * {@codesnippet com.azure.keyvault.secrets.secretclient.backupSecretWithResponse#string} * * @param name The name of the secret. * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value} @@ -443,11 +571,11 @@ Mono> recoverDeletedSecret(String name, Context context) { * @throws HttpRequestException when a secret with {@code name} is empty string. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> backupSecret(String name) { - return withContext(context -> backupSecret(name, context)); + public Mono> backupSecretWithResponse(String name) { + return withContext(context -> backupSecretWithResponse(name, context)); } - Mono> backupSecret(String name, Context context) { + Mono> backupSecretWithResponse(String name, Context context) { return service.backupSecret(endpoint, name, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .doOnRequest(ignored -> logger.info("Backing up secret - {}", name)) .doOnSuccess(response -> logger.info("Backed up secret - {}", name)) @@ -466,9 +594,28 @@ Mono> backupSecret(String name, Context context) { * restored secret details when a response is received.

*
      * //Pass the Secret Backup Byte array to the restore operation.
-     * secretAsyncClient.restoreSecret(secretBackupByteArray).subscribe(secretResponse ->
-     *   System.out.printf("Restored Secret with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.restoreSecret#byte} + * + * @param backup The backup blob associated with the secret. + * @return A {@link Mono} containing the {@link Secret restored secret}. + * @throws ResourceModifiedException when {@code backup} blob is malformed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restoreSecret(byte[] backup) { + return restoreSecretWithResponse(backup).flatMap(FluxUtil::toMono); + } + + /** + * Restores a backed up secret, and all its versions, to a vault. This operation requires the + * {@code secrets/restore} permission. + * + *

Code Samples

+ *

Restores the secret in the key vault from its backup. Subscribes to the call asynchronously + * and prints out the + * restored secret details when a response is received.

+ *
+     * //Pass the Secret Backup Byte array to the restore operation.
+     * {@codesnippet com.azure.keyvault.secrets.secretclient.restoreSecretWithResponse#byte}
      *
      * @param backup The backup blob associated with the secret.
      * @return A {@link Mono} containing a {@link Response} whose {@link Response#value() value}
@@ -476,11 +623,11 @@ Mono> backupSecret(String name, Context context) {
      * @throws ResourceModifiedException when {@code backup} blob is malformed.
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
-    public Mono> restoreSecret(byte[] backup) {
-        return withContext(context -> restoreSecret(backup, context));
+    public Mono> restoreSecretWithResponse(byte[] backup) {
+        return withContext(context -> restoreSecretWithResponse(backup, context));
     }
 
-    Mono> restoreSecret(byte[] backup, Context context) {
+    Mono> restoreSecretWithResponse(byte[] backup, Context context) {
         SecretRestoreRequestParameters parameters = new SecretRestoreRequestParameters().secretBackup(backup);
         return service.restoreSecret(endpoint, API_VERSION, ACCEPT_LANGUAGE, parameters, CONTENT_TYPE_HEADER_VALUE, context)
                 .doOnRequest(ignored -> logger.info("Attempting to restore secret"))
@@ -496,11 +643,7 @@ Mono> restoreSecret(byte[] backup, Context context) {
      * 

Code Samples

*

It is possible to get full Secrets with values from this information. Convert the {@link Flux} containing {@link SecretBase base secret} to * {@link Flux} containing {@link Secret secret} using {@link SecretAsyncClient#getSecret(SecretBase baseSecret)} within {@link Flux#flatMap(Function)}.

- *
-     * Flux<Secret> secrets = secretAsyncClient.listSecrets()
-     *   .flatMap(secretAsyncClient::getSecret)
-     *   .map(Response::value);
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.listSecrets} * * @return A {@link PagedFlux} containing {@link SecretBase secret} of all the secrets in the vault. */ @@ -548,10 +691,7 @@ private Mono> listSecretsFirstPage(Context context) { *

Code Samples

*

Lists the deleted secrets in the key vault. Subscribes to the call asynchronously and prints out the * recovery id of each deleted secret when a response is received.

- *
-     * secretAsyncClient.listDeletedSecrets().subscribe(deletedSecret ->
-     *   System.out.printf("Deleted secret's recovery Id %s \n", deletedSecret.recoveryId()));
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.listDeletedSecrets} * * @return A {@link Flux} containing all of the {@link DeletedSecret deleted secrets} in the vault. */ @@ -601,11 +741,7 @@ private Mono> listDeletedSecretsFirstPage(Context c *

It is possible to get the Secret with value of all the versions from this information. Convert the {@link Flux} * containing {@link SecretBase base secret} to {@link Flux} containing {@link Secret secret} using * {@link SecretAsyncClient#getSecret(SecretBase baseSecret)} within {@link Flux#flatMap(Function)}.

- *
-     * Flux<Secret> secrets = secretAsyncClient.listSecretVersions("secretName")
-     *   .flatMap(secretAsyncClient::getSecret)
-     *   .map(Response::value);
-     * 
+ * {@codesnippet com.azure.keyvault.secrets.secretclient.listSecretVersions#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. @@ -630,7 +766,7 @@ PagedFlux listSecretVersions(String name, Context context) { * {@link SecretAsyncClient#listSecretVersions()}. * * @param continuationToken The {@link PagedResponse#nextLink()} from a previous, successful call to one of the list operations. - * + * * @return A {@link Mono} of {@link PagedResponse} from the next page of results. */ private Mono> listSecretVersionsNextPage(String continuationToken, Context context) { diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java index dab070eda156..590800600dfb 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java @@ -9,6 +9,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.VoidResponse; import com.azure.core.implementation.annotation.ServiceClient; +import com.azure.core.util.Context; import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretBase; @@ -48,24 +49,16 @@ public final class SecretClient { * set to true by key vault, if not specified.

* *

Code Samples

- *

Creates a new secret which expires in 60 days in the key vault. Prints out the details of the - * newly created secret returned in the response.

- *
-     * Secret secret = new Secret("secretName", "secretValue")
-     *   .expires(OffsetDateTime.now.plusDays(60));
-     *
-     * Secret retSecret = secretClient.setSecret(keySecret).value();
-     * System.out.printf("Secret is created with name %s and value %s \n", retSecret.name(), retSecret.value());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.setSecret#secret} * * @param secret The Secret object containing information about the secret and its properties. The properties secret.name and secret.value must be non null. * @throws NullPointerException if {@code secret} is {@code null}. * @throws ResourceModifiedException if {@code secret} is malformed. * @throws HttpRequestException if {@link Secret#name() name} or {@link Secret#value() value} is empty string. - * @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret created secret}. + * @return The {@link Secret created secret}. */ - public Response setSecret(Secret secret) { - return client.setSecret(secret).block(); + public Secret setSecret(Secret secret) { + return setSecretWithResponse(secret, Context.NONE).value(); } /** @@ -74,19 +67,34 @@ public Response setSecret(Secret secret) { * *

Code Samples

*

Creates a new secret in the key vault. Prints out the details of the newly created secret returned in the response.

- *
-     * Secret secret = secretClient.setSecret("secretName", "secretValue").value();
-     * System.out.printf("Secret is created with name %s and value %s \n", secret.name(), secret.value());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.setSecret#string-string} * * @param name The name of the secret. It is required and cannot be null. * @param value The value of the secret. It is required and cannot be null. * @throws ResourceModifiedException if invalid {@code name} or {@code value} is specified. * @throws HttpRequestException if {@code name} or {@code value} is empty string. + * @return The {@link Secret created secret}. + */ + public Secret setSecret(String name, String value) { + return client.setSecretWithResponse(name, value, Context.NONE).block().value(); + } + + /** + * The set operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. + * This operation requires the {@code secrets/set} permission. + * + *

Code Samples

+ *

Creates a new secret in the key vault. Prints out the details of the newly created secret returned in the response.

+ * {@codesnippet com.azure.security.keyvault.secretclient.setSecretWithResponse#secret-Context} + * + * @param secret The Secret object containing information about the secret and its properties. The properties secret.name and secret.value must be non null. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceModifiedException if invalid {@code name} or {@code value} is specified. + * @throws HttpRequestException if {@code name} or {@code value} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret created secret}. */ - public Response setSecret(String name, String value) { - return client.setSecret(name, value).block(); + public Response setSecretWithResponse(Secret secret, Context context) { + return client.setSecretWithResponse(secret, context).block(); } /** @@ -95,20 +103,36 @@ public Response setSecret(String name, String value) { * *

Code Samples

*

Gets a specific version of the secret in the key vault. Prints out the details of the returned secret.

- *
-     * String secretVersion = "6A385B124DEF4096AF1361A85B16C204";
-     * Secret secretWithVersion = secretClient.getSecret("secretName", secretVersion).value();
-     * System.out.printf("Secret is returned with name %s and value %s \n", secretWithVersion.name(), secretWithVersion.value());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.getSecret#string-string} * * @param name The name of the secret, cannot be null. * @param version The version of the secret to retrieve. If this is an empty String or null, this call is equivalent to calling {@link #getSecret(String)}, with the latest version being retrieved. * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} or {@code version} is empty string. + * @return The requested {@link Secret secret}. + */ + public Secret getSecret(String name, String version) { + return getSecretWithResponse(name, version, Context.NONE).value(); + } + + /** + * Get the secret which represents {@link SecretBase secretBase} from the key vault. The get operation is applicable to any + * secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission. + * + *

The list operations {@link SecretClient#listSecrets()} and {@link SecretClient#listSecretVersions(String)} return + * the {@link List} containing {@link SecretBase base secret} as output excluding the include the value of the secret. + * This operation can then be used to get the full secret with its value from {@code secretBase}.

+ *

Code Samples

+ * {@codesnippet com.azure.security.keyvault.secretclient.getSecretWithResponse#secretBase} + * + * @param secretBase The {@link SecretBase base secret} holding attributes of the secret being requested. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link SecretBase#version() version} doesn't exist in the key vault. + * @throws HttpRequestException if {@link SecretBase#name() name} or {@link SecretBase#version() version} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the requested {@link Secret secret}. */ - public Response getSecret(String name, String version) { - return client.getSecret(name, version).block(); + public Response getSecretWithResponse(SecretBase secretBase, Context context) { + return client.getSecretWithResponse(secretBase, context).block(); } /** @@ -118,15 +142,16 @@ public Response getSecret(String name, String version) { *

The list operations {@link SecretClient#listSecrets()} and {@link SecretClient#listSecretVersions(String)} return * the {@link List} containing {@link SecretBase base secret} as output excluding the include the value of the secret. * This operation can then be used to get the full secret with its value from {@code secretBase}.

+ *

Code Samples

* {@codesnippet com.azure.security.keyvault.secretclient.getSecret#secretBase} * * @param secretBase The {@link SecretBase base secret} holding attributes of the secret being requested. * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link SecretBase#version() version} doesn't exist in the key vault. * @throws HttpRequestException if {@link SecretBase#name() name} or {@link SecretBase#version() version} is empty string. - * @return A {@link Response} whose {@link Response#value() value} contains the requested {@link Secret secret}. + * @return The requested {@link Secret secret}. */ - public Response getSecret(SecretBase secretBase) { - return client.getSecret(secretBase).block(); + public Secret getSecret(SecretBase secretBase) { + return getSecretWithResponse(secretBase, Context.NONE).value(); } /** @@ -135,18 +160,41 @@ public Response getSecret(SecretBase secretBase) { * *

Code Samples

*

Gets the latest version of the secret in the key vault. Prints out the details of the returned secret.

- *
-     * Secret secret = secretClient.getSecret("secretName").value();
-     * System.out.printf("Secret is returned with name %s and value %s \n", secret.name(), secret.value());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.getSecret#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException if {@code name} is empty string. - * @return A {@link Response} whose {@link Response#value()} contains the requested {@link Secret}. + * @return The requested {@link Secret}. */ - public Response getSecret(String name) { - return getSecret(name, ""); + public Secret getSecret(String name) { + return getSecretWithResponse(name, "", Context.NONE).value(); + } + + /** + * Get the specified secret with specified version from the key vault. The get operation is + * applicable to any secret stored in Azure Key Vault. This operation requires the {@code + * secrets/get} permission. + * + *

Code Samples

+ *

Gets a specific version of the secret in the key vault. Subscribes to the call + * asynchronously and prints out the + * returned secret details when a response is received.

+ * {@codesnippet com.azure.security.keyvault.secretclient.getSecretWithResponse#string-string-Context} + * + * @param name The name of the secret, cannot be null + * @param version The version of the secret to retrieve. If this is an empty String or null, this + * call is equivalent to calling {@link #getSecret(String)}, with the latest version being + * retrieved. + * @param context Additional context that is passed through the Http pipeline during the service call. + * + * @return A {@link Response} whose {@link Response#value() value} contains the requested {@link Secret}. + * @throws ResourceNotFoundException when a secret with {@code name} and {@code version} doesn't + * exist in the key vault. + * @throws HttpRequestException if {@code name} name} or {@code version} is empty string. + */ + public Response getSecretWithResponse(String name, String version, Context context) { + return client.getSecretWithResponse(name, version, context).block(); } /** @@ -158,21 +206,38 @@ public Response getSecret(String name) { * *

Code Samples

*

Gets the latest version of the secret, changes its expiry time and the updates the secret in the key vault.

- *
-     * Secret secret = secretClient.getSecret("secretName").value();
-     * secret.expires(OffsetDateTime.now().plusDays(60));
-     * SecretBase updatedSecretBase = secretClient.updateSecret(secret).value();
-     * Secret updatedSecret = secretClient.getSecret(updatedSecretBase.name()).value();
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.updateSecretWithResponse#secretBase-Context} * * @param secret The {@link SecretBase base secret} object with updated properties. + * @param context Additional context that is passed through the Http pipeline during the service call. * @throws NullPointerException if {@code secret} is {@code null}. * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link SecretBase#version() version} doesn't exist in the key vault. * @throws HttpRequestException if {@link SecretBase#name() name} or {@link SecretBase#version() version} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the {@link SecretBase updated secret}. */ - public Response updateSecret(SecretBase secret) { - return client.updateSecret(secret).block(); + public Response updateSecretWithResponse(SecretBase secret, Context context) { + return client.updateSecretWithResponse(secret, context).block(); + } + + /** + * Updates the attributes associated with the specified secret, but not the value of the specified secret in the key vault. The update + * operation changes specified attributes of an existing stored secret and attributes that are not specified in the request are left unchanged. + * The value of a secret itself cannot be changed. This operation requires the {@code secrets/set} permission. + * + *

The {@code secret} is required and its fields {@link SecretBase#name() name} and {@link SecretBase#version() version} cannot be null.

+ * + *

Code Samples

+ *

Gets the latest version of the secret, changes its expiry time and the updates the secret in the key vault.

+ * {@codesnippet com.azure.security.keyvault.secretclient.updateSecret#secretBase} + * + * @param secret The {@link SecretBase base secret} object with updated properties. + * @throws NullPointerException if {@code secret} is {@code null}. + * @throws ResourceNotFoundException when a secret with {@link SecretBase#name() name} and {@link SecretBase#version() version} doesn't exist in the key vault. + * @throws HttpRequestException if {@link SecretBase#name() name} or {@link SecretBase#version() version} is empty string. + * @return The {@link SecretBase updated secret}. + */ + public SecretBase updateSecret(SecretBase secret) { + return updateSecretWithResponse(secret, Context.NONE).value(); } /** @@ -182,18 +247,53 @@ public Response updateSecret(SecretBase secret) { * *

Code Samples

*

Deletes the secret from the keyvault. Prints out the recovery id of the deleted secret returned in the response.

- *
-     * DeletedSecret deletedSecret = secretClient.deleteSecret("secretName").value();
-     * System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.recoveryId()));
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.deleteSecret#string} * * @param name The name of the secret to be deleted. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedSecret deleted secret}. */ - public Response deleteSecret(String name) { - return client.deleteSecret(name).block(); + public DeletedSecret deleteSecret(String name) { + return deleteSecretWithResponse(name, Context.NONE).value(); + } + + /** + * Deletes a secret from the key vault. If soft-delete is enabled on the key vault then the secret is placed in the deleted state + * and requires to be purged for permanent deletion else the secret is permanently deleted. The delete operation applies to any secret stored in Azure Key Vault but + * it cannot be applied to an individual version of a secret. This operation requires the {@code secrets/delete} permission. + * + *

Code Samples

+ *

Deletes the secret from the keyvault. Prints out the recovery id of the deleted secret returned in the response.

+ * {@codesnippet com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context} + * + * @param name The name of the secret to be deleted. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedSecret deleted secret}. + */ + public Response deleteSecretWithResponse(String name, Context context) { + return client.deleteSecretWithResponse(name, context).block(); + } + + /** + * The get deleted secret operation returns the secrets that have been deleted for a vault enabled for soft-delete. + * This operation requires the {@code secrets/list} permission. + * + *

Code Samples

+ *

Gets the deleted secret from the key vault enabled for soft-delete. Prints out the details of the deleted secret + * returned in the response.

+ * //Assuming secret is deleted on a soft-delete enabled key vault. + * {@codesnippet com.azure.security.keyvault.secretclient.getDeletedSecret#string} + * + * @param name The name of the deleted secret. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return The {@link DeletedSecret deleted secret}. + */ + public DeletedSecret getDeletedSecret(String name) { + return getDeletedSecretWithResponse(name, Context.NONE).value(); } /** @@ -203,19 +303,17 @@ public Response deleteSecret(String name) { *

Code Samples

*

Gets the deleted secret from the key vault enabled for soft-delete. Prints out the details of the deleted secret * returned in the response.

- *
      * //Assuming secret is deleted on a soft-delete enabled key vault.
-     * DeletedSecret deletedSecret = secretClient.getDeletedSecret("secretName").value();
-     * System.out.printf("Deleted Secret with recovery Id %s \n", deletedSecret.recoveryId());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.getDeletedSecretWithResponse#string-Context} * * @param name The name of the deleted secret. + * @param context Additional context that is passed through the Http pipeline during the service call. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedSecret deleted secret}. */ - public Response getDeletedSecret(String name) { - return client.getDeletedSecret(name).block(); + public Response getDeletedSecretWithResponse(String name, Context context) { + return client.getDeletedSecretWithResponse(name, context).block(); } /** @@ -224,11 +322,8 @@ public Response getDeletedSecret(String name) { * *

Code Samples

*

Purges the deleted secret from the key vault enabled for soft-delete. Prints out the status code from the server response.

- *
      * //Assuming secret is deleted on a soft-delete enabled key vault.
-     * VoidResponse purgeResponse = secretClient.purgeDeletedSecret("deletedSecretName");
-     * System.out.printf("Purge Status Code: %d", purgeResponse.statusCode());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.purgeDeletedSecret#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. @@ -236,7 +331,45 @@ public Response getDeletedSecret(String name) { * @return A {@link VoidResponse}. */ public VoidResponse purgeDeletedSecret(String name) { - return client.purgeDeletedSecret(name).block(); + return purgeDeletedSecret(name, Context.NONE); + } + + /** + * The purge deleted secret operation removes the secret permanently, without the possibility of recovery. + * This operation can only be enabled on a soft-delete enabled vault. This operation requires the {@code secrets/purge} permission. + * + *

Code Samples

+ *

Purges the deleted secret from the key vault enabled for soft-delete. Prints out the status code from the server response.

+ * //Assuming secret is deleted on a soft-delete enabled key vault. + * {@codesnippet com.azure.security.keyvault.secretclient.purgeDeletedSecret#string-Context} + * + * @param name The name of the secret. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link VoidResponse}. + */ + public VoidResponse purgeDeletedSecret(String name, Context context) { + return client.purgeDeletedSecret(name, context).block(); + } + + /** + * Recovers the deleted secret in the key vault to its latest version and can only be performed on a soft-delete enabled vault. + * This operation requires the {@code secrets/recover} permission. + * + *

Code Samples

+ *

Recovers the deleted secret from the key vault enabled for soft-delete. Prints out the details of the recovered secret + * returned in the response.

+ * //Assuming secret is deleted on a soft-delete enabled key vault. + * {@codesnippet com.azure.security.keyvault.secretclient.recoverDeletedSecret#string} + * + * @param name The name of the deleted secret to be recovered. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return The {@link Secret recovered secret}. + */ + public Secret recoverDeletedSecret(String name) { + return recoverDeletedSecretWithResponse(name, Context.NONE).value(); } /** @@ -246,19 +379,17 @@ public VoidResponse purgeDeletedSecret(String name) { *

Code Samples

*

Recovers the deleted secret from the key vault enabled for soft-delete. Prints out the details of the recovered secret * returned in the response.

- *
      * //Assuming secret is deleted on a soft-delete enabled key vault.
-     * Secret recoveredSecret =  secretClient.recoverDeletedSecret("deletedSecretName").value();
-     * System.out.printf("Recovered Secret with name %s", recoveredSecret.name());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context} * * @param name The name of the deleted secret to be recovered. + * @param context Additional context that is passed through the Http pipeline during the service call. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret recovered secret}. */ - public Response recoverDeletedSecret(String name) { - return client.recoverDeletedSecret(name).block(); + public Response recoverDeletedSecretWithResponse(String name, Context context) { + return client.recoverDeletedSecretWithResponse(name, context).block(); } /** @@ -267,18 +398,33 @@ public Response recoverDeletedSecret(String name) { * *

Code Samples

*

Backs up the secret from the key vault and prints out the length of the secret's backup byte array returned in the response

- *
-     * byte[] secretBackup = secretClient.backupSecret("secretName").value();
-     * System.out.printf("Secret's Backup Byte array's length %s", secretBackup.length);
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.backupSecret#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. * @throws HttpRequestException when a secret with {@code name} is empty string. * @return A {@link Response} whose {@link Response#value() value} contains the backed up secret blob. */ - public Response backupSecret(String name) { - return client.backupSecret(name).block(); + public byte[] backupSecret(String name) { + return backupSecretWithResponse(name, Context.NONE).value(); + } + + /** + * Requests a backup of the specified secret be downloaded to the client. All versions of the secret will be downloaded. + * This operation requires the {@code secrets/backup} permission. + * + *

Code Samples

+ *

Backs up the secret from the key vault and prints out the length of the secret's backup byte array returned in the response

+ * {@codesnippet com.azure.security.keyvault.secretclient.backupSecretWithResponse#string-Context} + * + * @param name The name of the secret. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link Response} whose {@link Response#value() value} contains the backed up secret blob. + */ + public Response backupSecretWithResponse(String name, Context context) { + return client.backupSecretWithResponse(name, context).block(); } /** @@ -288,18 +434,34 @@ public Response backupSecret(String name) { *

Code Samples

*

Restores the secret in the key vault from its backup byte array. Prints out the details of the restored secret returned * in the response.

- *
      * //Pass the secret backup byte array of the secret to be restored.
-     * Secret restoredSecret = secretClient.restoreSecret(secretBackupByteArray).value();
-     * System.out.printf("Restored Secret with name %s and value %s", restoredSecret.name(), restoredSecret.value());
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.restoreSecret#byte} * * @param backup The backup blob associated with the secret. * @throws ResourceModifiedException when {@code backup} blob is malformed. * @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret restored secret}. */ - public Response restoreSecret(byte[] backup) { - return client.restoreSecret(backup).block(); + public Secret restoreSecret(byte[] backup) { + return restoreSecretWithResponse(backup, Context.NONE).value(); + } + + /** + * Restores a backed up secret, and all its versions, to a vault. + * This operation requires the {@code secrets/restore} permission. + * + *

Code Samples

+ *

Restores the secret in the key vault from its backup byte array. Prints out the details of the restored secret returned + * in the response.

+ * //Pass the secret backup byte array of the secret to be restored. + * {@codesnippet com.azure.security.keyvault.secretclient.restoreSecretWithResponse#byte-Context} + * + * @param backup The backup blob associated with the secret. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceModifiedException when {@code backup} blob is malformed. + * @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret restored secret}. + */ + public Response restoreSecretWithResponse(byte[] backup, Context context) { + return client.restoreSecretWithResponse(backup, context).block(); } /** @@ -309,17 +471,28 @@ public Response restoreSecret(byte[] backup) { * *

It is possible to get full secrets with values from this information. Loop over the {@link SecretBase secret} and * call {@link SecretClient#getSecret(SecretBase baseSecret)} . This will return the {@link Secret secret} with value included of its latest version.

- *
-     * for (SecretBase secret : secretClient.listSecrets()) {
-     *   Secret secretWithValue  = secretClient.getSecret(secret).value();
-     *   System.out.printf("Received secret with name %s and value %s", secretWithValue.name(), secretWithValue.value());
-     * }
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.listSecrets} * * @return A {@link List} containing {@link SecretBase} of all the secrets in the vault. The {@link SecretBase} contains all the information about the secret, except its value. */ public Iterable listSecrets() { - return client.listSecrets().toIterable(); + return listSecrets(Context.NONE); + } + + /** + * List the secrets in the key vault. The list Secrets operation is applicable to the entire vault. The individual secret response + * in the list is represented by {@link SecretBase} as only the base secret identifier and its attributes are + * provided in the response. The secret values and individual secret versions are not listed in the response. This operation requires the {@code secrets/list} permission. + * + *

It is possible to get full secrets with values from this information. Loop over the {@link SecretBase secret} and + * call {@link SecretClient#getSecret(SecretBase baseSecret)} . This will return the {@link Secret secret} with value included of its latest version.

+ * {@codesnippet com.azure.security.keyvault.secretclient.listSecrets#Context} + * + * @param context Additional context that is passed through the Http pipeline during the service call.* + * @return A {@link List} containing {@link SecretBase} of all the secrets in the vault. The {@link SecretBase} contains all the information about the secret, except its value. + */ + public Iterable listSecrets(Context context) { + return client.listSecrets(context).toIterable(); } /** @@ -328,16 +501,27 @@ public Iterable listSecrets() { * *

Code Samples

*

Lists the deleted secrets in the key vault and for each deleted secret prints out its recovery id.

- *
-     * for (DeletedSecret deletedSecret : secretClient.listDeletedSecrets()) {
-     *   System.out.printf("Deleted secret's recovery Id %s", deletedSecret.recoveryId());
-     * }
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.listDeletedSecrets#Context} + * + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link List} containing all of the {@link DeletedSecret deleted secrets} in the vault. + */ + public Iterable listDeletedSecrets(Context context) { + return client.listDeletedSecrets(context).toIterable(); + } + + /** + * Lists {@link DeletedSecret deleted secrets} of the key vault. The get deleted secrets operation returns the secrets that + * have been deleted for a vault enabled for soft-delete. This operation requires the {@code secrets/list} permission. + * + *

Code Samples

+ *

Lists the deleted secrets in the key vault and for each deleted secret prints out its recovery id.

+ * {@codesnippet com.azure.security.keyvault.secretclient.listDeletedSecrets} * * @return A {@link List} containing all of the {@link DeletedSecret deleted secrets} in the vault. */ public Iterable listDeletedSecrets() { - return client.listDeletedSecrets().toIterable(); + return listDeletedSecrets(Context.NONE); } /** @@ -347,12 +531,7 @@ public Iterable listDeletedSecrets() { * *

It is possible to get full Secrets with values for each version from this information. Loop over the {@link SecretBase secret} and * call {@link SecretClient#getSecret(SecretBase)} . This will return the {@link Secret} secrets with values included of the specified versions.

- *
-     * for (SecretBase secret : secretClient.listSecretVersions("secretName")) {
-     *   Secret secretWithValue  = secretClient.getSecret(secret).value();
-     *   System.out.printf("Received secret's version with name %s and value %s", secretWithValue.name(), secretWithValue.value());
-     * }
-     * 
+ * {@codesnippet com.azure.security.keyvault.secretclient.listSecretVersions#string} * * @param name The name of the secret. * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. @@ -360,6 +539,25 @@ public Iterable listDeletedSecrets() { * @return A {@link List} containing {@link SecretBase} of all the versions of the specified secret in the vault. List is empty if secret with {@code name} does not exist in key vault */ public Iterable listSecretVersions(String name) { - return client.listSecretVersions(name).toIterable(); + return listSecretVersions(name, Context.NONE); + } + + /** + * List all versions of the specified secret. The individual secret response in the list is represented by {@link SecretBase} + * as only the base secret identifier and its attributes are provided in the response. The secret values are + * not provided in the response. This operation requires the {@code secrets/list} permission. + * + *

It is possible to get full Secrets with values for each version from this information. Loop over the {@link SecretBase secret} and + * call {@link SecretClient#getSecret(SecretBase)} . This will return the {@link Secret} secrets with values included of the specified versions.

+ * {@codesnippet com.azure.security.keyvault.secretclient.listSecretVersions#string-Context} + * + * @param name The name of the secret. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @throws ResourceNotFoundException when a secret with {@code name} doesn't exist in the key vault. + * @throws HttpRequestException when a secret with {@code name} is empty string. + * @return A {@link List} containing {@link SecretBase} of all the versions of the specified secret in the vault. List is empty if secret with {@code name} does not exist in key vault + */ + public Iterable listSecretVersions(String name, Context context) { + return client.listSecretVersions(name, context).toIterable(); } } diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java index 2cbd05b7b260..7b1e561dc44f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.implementation.annotation.ServiceClientBuilder; +import com.azure.core.implementation.http.policy.spi.HttpPolicyProviders; import com.azure.core.util.configuration.ConfigurationManager; import com.azure.core.util.configuration.Configuration; import com.azure.core.credentials.TokenCredential; @@ -32,7 +33,7 @@ *

The minimal configuration options required by {@link SecretClientBuilder secretClientBuilder} to build * {@link SecretAsyncClient} are {@link String endpoint} and {@link TokenCredential credential}.

* - * {@codesnippet com.azure.security.keyvault.secretclient.async.construct} + * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.construct} * *

Samples to construct the sync client

* {@codesnippet com.azure.security.keyvault.secretclient.sync.construct} @@ -40,12 +41,12 @@ *

The {@link HttpLogDetailLevel log detail level}, multiple custom {@link HttpLoggingPolicy policies} and custom * {@link HttpClient http client} can be optionally configured in the {@link SecretClientBuilder}.

* - * {@codesnippet com.azure.security.keyvault.keys.async.secretclient.withhttpclient.instantiation} + * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation} * *

Alternatively, custom {@link HttpPipeline http pipeline} with custom {@link HttpPipelinePolicy} policies and {@link String endpoint} * can be specified. It provides finer control over the construction of {@link SecretAsyncClient client}

- * {@codesnippet com.azure.security.keyvault.keys.async.secretclient.pipeline.instantiation} + * {@codesnippet com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation} * * @see SecretClient * @see SecretAsyncClient @@ -122,9 +123,11 @@ public SecretAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new BearerTokenAuthenticationPolicy(credential, SecretAsyncClient.KEY_VAULT_SCOPE)); policies.addAll(this.policies); + HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogDetailLevel)); HttpPipeline pipeline = new HttpPipelineBuilder() diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java index f905fd0cbc38..2761fae8156e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperations.java @@ -42,7 +42,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // Backups are good to have, if in case secrets get accidentally deleted by you. // For long term storage, it is ideal to write the backup to a file. String backupFilePath = "YOUR_BACKUP_FILE_PATH"; - byte[] secretBackup = client.backupSecret("StorageAccountPassword").value(); + byte[] secretBackup = client.backupSecret("StorageAccountPassword"); writeBackupToFile(secretBackup, backupFilePath); // The storage account secret is no longer in use, so you delete it. @@ -59,7 +59,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the secret is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); - Secret restoredSecret = client.restoreSecret(backupFromFile).value(); + Secret restoredSecret = client.restoreSecret(backupFromFile); } private static void writeBackupToFile(byte[] bytes, String filePath) { diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java index 7b4bebaf5224..51967100bcc1 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/BackupAndRestoreOperationsAsync.java @@ -39,7 +39,7 @@ public static void main(String[] args) throws IOException, InterruptedException, secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .expires(OffsetDateTime.now().plusYears(1))) .subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); @@ -47,7 +47,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // For long term storage, it is ideal to write the backup to a file. String backupFilePath = "YOUR_BACKUP_FILE_PATH"; secretAsyncClient.backupSecret("StorageAccountPassword").subscribe(backupResponse -> { - byte[] backupBytes = backupResponse.value(); + byte[] backupBytes = backupResponse; writeBackupToFile(backupBytes, backupFilePath); }); @@ -55,7 +55,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // The storage account secret is no longer in use, so you delete it. secretAsyncClient.deleteSecret("StorageAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); //To ensure file is deleted on server side. Thread.sleep(30000); @@ -70,7 +70,7 @@ public static void main(String[] args) throws IOException, InterruptedException, // After sometime, the secret is required again. We can use the backup value to restore it in the key vault. byte[] backupFromFile = Files.readAllBytes(new File(backupFilePath).toPath()); secretAsyncClient.restoreSecret(backupFromFile).subscribe(secretResponse -> - System.out.printf("Restored Secret with name %s \n", secretResponse.value().name())); + System.out.printf("Restored Secret with name %s \n", secretResponse.name())); //To ensure secret is restored on server side. Thread.sleep(15000); diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java index 94f50ed062d1..e1f816fcb1cb 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorld.java @@ -36,14 +36,14 @@ public static void main(String[] args) throws InterruptedException, IllegalArgum .expires(OffsetDateTime.now().plusYears(1))); // Let's Get the bank secret from the key vault. - Secret bankSecret = secretClient.getSecret("BankAccountPassword").value(); + Secret bankSecret = secretClient.getSecret("BankAccountPassword"); System.out.printf("Secret is returned with name %s and value %s \n", bankSecret.name(), bankSecret.value()); // After one year, the bank account is still active, we need to update the expiry time of the secret. // The update method can be used to update the expiry attribute of the secret. It cannot be used to update // the value of the secret. bankSecret.expires(bankSecret.expires().plusYears(1)); - SecretBase updatedSecret = secretClient.updateSecret(bankSecret).value(); + SecretBase updatedSecret = secretClient.updateSecret(bankSecret); System.out.printf("Secret's updated expiry time %s \n", updatedSecret.expires()); // Bank forced a password update for security purposes. Let's change the value of the secret in the key vault. diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java index 9f368c85c576..17015ed1915c 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/HelloWorldAsync.java @@ -32,13 +32,13 @@ public static void main(String[] args) throws InterruptedException { // already exists in the key vault, then a new version of the secret is created. secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") .expires(OffsetDateTime.now().plusYears(1))).subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); // Let's Get the bank secret from the key vault. secretAsyncClient.getSecret("BankAccountPassword").subscribe(secretResponse -> - System.out.printf("Secret returned with name %s , value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret returned with name %s , value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); @@ -46,11 +46,11 @@ public static void main(String[] args) throws InterruptedException { // The update method can be used to update the expiry attribute of the secret. It cannot be used to update // the value of the secret. secretAsyncClient.getSecret("BankAccountPassword").subscribe(secretResponse -> { - Secret secret = secretResponse.value(); + Secret secret = secretResponse; //Update the expiry time of the secret. secret.expires(secret.expires().plusYears(1)); secretAsyncClient.updateSecret(secret).subscribe(updatedSecretResponse -> - System.out.printf("Secret's updated expiry time %s \n", updatedSecretResponse.value().expires().toString())); + System.out.printf("Secret's updated expiry time %s \n", updatedSecretResponse.expires().toString())); }); Thread.sleep(2000); @@ -59,13 +59,13 @@ public static void main(String[] args) throws InterruptedException { // To achieve this, we need to create a new version of the secret in the key vault. The update operation cannot // change the value of the secret. secretAsyncClient.setSecret("BankAccountPassword", "bhjd4DDgsa").subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); // The bank account was closed, need to delete its credentials from the key vault. secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); //To ensure secret is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java index f45e97af158f..44198074dfa7 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperations.java @@ -40,7 +40,7 @@ public static void main(String[] args) throws IllegalArgumentException { // You need to check if any of the secrets are sharing same values. Let's list the secrets and print their values. // List operations don't return the secrets with value information. So, for each returned secret we call getSecret to get the secret with its value information. for (SecretBase secret : client.listSecrets()) { - Secret secretWithValue = client.getSecret(secret).value(); + Secret secretWithValue = client.getSecret(secret); System.out.printf("Received secret with name %s and value %s \n", secretWithValue.name(), secretWithValue.value()); } @@ -50,7 +50,7 @@ public static void main(String[] args) throws IllegalArgumentException { // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. for (SecretBase secret : client.listSecretVersions("BankAccountPassword")) { - Secret secretWithValue = client.getSecret(secret).value(); + Secret secretWithValue = client.getSecret(secret); System.out.printf("Received secret's version with name %s and value %s", secretWithValue.name(), secretWithValue.value()); } } diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java index af085d95627b..f0ad91aa2bdf 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ListOperationsAsync.java @@ -33,14 +33,14 @@ public static void main(String[] args) throws InterruptedException { secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") .expires(OffsetDateTime.now().plusYears(1))) .subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .expires(OffsetDateTime.now().plusYears(1))) .subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); @@ -49,7 +49,7 @@ public static void main(String[] args) throws InterruptedException { secretAsyncClient.listSecrets() .subscribe(secretBase -> secretAsyncClient.getSecret(secretBase).subscribe(secretResponse -> - System.out.printf("Received secret with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value()))); + System.out.printf("Received secret with name %s and value %s \n", secretResponse.name(), secretResponse.value()))); Thread.sleep(15000); @@ -57,14 +57,14 @@ public static void main(String[] args) throws InterruptedException { // Calling setSecret on an existing secret creates a new version of the secret in the key vault with the new value. secretAsyncClient.setSecret(new Secret("BankAccountPassword", "sskdjfsdasdjsd") .expires(OffsetDateTime.now().plusYears(1))).subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); // You need to check all the different values your bank account password secret had previously. Lets print all the versions of this secret. secretAsyncClient.listSecretVersions("BankAccountPassword").subscribe(secretBase -> secretAsyncClient.getSecret(secretBase).subscribe(secretResponse -> - System.out.printf("Received secret's version with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value()))); + System.out.printf("Received secret's version with name %s and value %s \n", secretResponse.name(), secretResponse.value()))); Thread.sleep(15000); } diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java index fa9e5a0915fb..9910f64a2040 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/ManagingDeletedSecretsAsync.java @@ -36,19 +36,19 @@ public static void main(String[] args) throws InterruptedException { // already exists in the key vault, then a new version of the secret is created. secretAsyncClient.setSecret(new Secret("BankAccountPassword", "f4G34fMh8v") .expires(OffsetDateTime.now().plusYears(1))).subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); secretAsyncClient.setSecret(new Secret("StorageAccountPassword", "f4G34fMh8v-fdsgjsk2323=-asdsdfsdf") .expires(OffsetDateTime.now().plusYears(1))).subscribe(secretResponse -> - System.out.printf("Secret is created with name %s and value %s \n", secretResponse.value().name(), secretResponse.value().value())); + System.out.printf("Secret is created with name %s and value %s \n", secretResponse.name(), secretResponse.value())); Thread.sleep(2000); // The storage account was closed, need to delete its credentials from the key vault. secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); //To ensure secret is deleted on server side. Thread.sleep(30000); @@ -56,7 +56,7 @@ public static void main(String[] args) throws InterruptedException { // We accidentally deleted bank account secret. Let's recover it. // A deleted secret can only be recovered if the key vault is soft-delete enabled. secretAsyncClient.recoverDeletedSecret("BankAccountPassword").subscribe(recoveredSecretResponse -> - System.out.printf("Recovered Secret with name %s \n", recoveredSecretResponse.value().name())); + System.out.printf("Recovered Secret with name %s \n", recoveredSecretResponse.name())); //To ensure secret is recovered on server side. Thread.sleep(10000); @@ -64,10 +64,10 @@ public static void main(String[] args) throws InterruptedException { // The bank acoount and storage accounts got closed. // Let's delete bank and storage accounts secrets. secretAsyncClient.deleteSecret("BankAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); secretAsyncClient.deleteSecret("StorageAccountPassword").subscribe(deletedSecretResponse -> - System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); // To ensure secret is deleted on server side. Thread.sleep(30000); diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java new file mode 100644 index 000000000000..38c3d791c8ed --- /dev/null +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretAsyncClientJavaDocCodeSnippets.java @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.secrets; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.test.models.RecordedData; +import com.azure.core.test.policy.RecordNetworkCallPolicy; +import reactor.util.context.Context; +import com.azure.identity.credential.DefaultAzureCredential; +import com.azure.security.keyvault.secrets.models.Secret; +import com.azure.security.keyvault.secrets.models.SecretBase; + +import java.time.OffsetDateTime; + +/** + * This class contains code samples for generating javadocs through doclets for {@link SecretClient} + */ +public final class SecretAsyncClientJavaDocCodeSnippets { + + private String key1 = "key1"; + private String key2 = "key2"; + private String value1 = "val1"; + private String value2 = "val2"; + + /** + * Generates code sample for creating a {@link SecretAsyncClient} + * @return An instance of {@link SecretAsyncClient} + */ + public SecretAsyncClient createAsyncClientWithHttpclient() { + // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation + RecordedData networkData = new RecordedData(); + HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); + SecretAsyncClient keyClient = new SecretClientBuilder() + .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) + .endpoint("https://myvault.azure.net/") + .credential(new DefaultAzureCredential()) + .addPolicy(new RecordNetworkCallPolicy(networkData)) + .httpClient(HttpClient.createDefault()) + .buildAsyncClient(); + // END: com.azure.security.keyvault.secrets.async.secretclient.withhttpclient.instantiation + return keyClient; + } + + /** + * Implementation for async SecretAsyncClient + * @return sync SecretAsyncClient + */ + private SecretAsyncClient getAsyncSecretClient() { + + // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.construct + SecretAsyncClient secretAsyncClient = new SecretClientBuilder() + .credential(new DefaultAzureCredential()) + .endpoint("https://myvault.vault.azure.net/") + .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) + .buildAsyncClient(); + // END: com.azure.security.keyvault.secrets.async.secretclient.construct + return secretAsyncClient; + } + + /** + * Generates code sample for creating a {@link SecretAsyncClient} + * @return An instance of {@link SecretAsyncClient} + */ + public SecretAsyncClient createAsyncClientWithPipeline() { + // BEGIN: com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation + RecordedData networkData = new RecordedData(); + HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); + SecretAsyncClient secretAsyncClient = new SecretClientBuilder() + .pipeline(pipeline) + .endpoint("https://myvault.azure.net/") + .credential(new DefaultAzureCredential()) + .buildAsyncClient(); + // END: com.azure.security.keyvault.secrets.async.secretclient.pipeline.instantiation + return secretAsyncClient; + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#getSecret(SecretBase)} + */ + public void getSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.getSecret#secretBase + secretAsyncClient.listSecrets() + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBase -> secretAsyncClient.getSecret(secretBase) + .subscribe(secretResponse -> + System.out.printf("Secret is returned with name %s and value %s %n", secretResponse.name(), + secretResponse.value()))); + // END: com.azure.keyvault.secrets.secretclient.getSecret#secretBase + + // BEGIN: com.azure.keyvault.secrets.secretclient.getSecret#string-string + String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; + secretAsyncClient.getSecret("secretName", secretVersion) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretWithVersion -> + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithVersion.name(), secretWithVersion.value())); + // END: com.azure.keyvault.secrets.secretclient.getSecret#string-string + + // BEGIN: com.azure.keyvault.secrets.secretclient.getSecret#string + secretAsyncClient.getSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretWithVersion -> + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithVersion.name(), secretWithVersion.value())); + // END: com.azure.keyvault.secrets.secretclient.getSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#getSecretWithResponse(SecretBase)} + */ + public void getSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretBase + secretAsyncClient.listSecrets() + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBase -> secretAsyncClient.getSecretWithResponse(secretBase) + .subscribe(secretResponse -> + System.out.printf("Secret is returned with name %s and value %s %n", secretResponse.value().name(), + secretResponse.value().value()))); + // END: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#secretBase + + // BEGIN: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#string-string + String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; + secretAsyncClient.getSecretWithResponse("secretName", secretVersion) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretWithVersion -> + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithVersion.value().name(), secretWithVersion.value().value())); + // END: com.azure.keyvault.secrets.secretclient.getSecretWithResponse#string-string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#setSecret(Secret)} + */ + public void setSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.setSecret#secret + Secret newSecret = new Secret("secretName", "secretValue"). + expires(OffsetDateTime.now().plusDays(60)); + secretAsyncClient.setSecret(newSecret) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponse -> + System.out.printf("Secret is created with name %s and value %s \n", + secretResponse.name(), secretResponse.value())); + // END: com.azure.keyvault.secrets.secretclient.setSecret#secret + + // BEGIN: com.azure.keyvault.secrets.secretclient.setSecret#string-string + secretAsyncClient.setSecret("secretName", "secretValue") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponse -> + System.out.printf("Secret is created with name %s and value %s \n", + secretResponse.name(), secretResponse.value())); + // END: com.azure.keyvault.secrets.secretclient.setSecret#string-string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#setSecretWithResponse(Secret)} + */ + public void setSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.setSecretWithResponse#secret + Secret newSecret = new Secret("secretName", "secretValue"). + expires(OffsetDateTime.now().plusDays(60)); + secretAsyncClient.setSecretWithResponse(newSecret) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponse -> + System.out.printf("Secret is created with name %s and value %s \n", + secretResponse.value().name(), secretResponse.value().value())); + // END: com.azure.keyvault.secrets.secretclient.setSecretWithResponse#secret + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#updateSecret(SecretBase)} + */ + public void updateSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.updateSecret#secretBase + secretAsyncClient.getSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponseValue -> { + Secret secret = secretResponseValue; + //Update the not before time of the secret. + secret.notBefore(OffsetDateTime.now().plusDays(50)); + secretAsyncClient.updateSecret(secret) + .subscribe(secretResponse -> + System.out.printf("Secret's updated not before time %s \n", + secretResponse.notBefore().toString())); + }); + // END: com.azure.keyvault.secrets.secretclient.updateSecret#secretBase + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#updateSecretWithResponse(SecretBase)} + */ + public void updateSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.updateSecretWithResponse#secretBase + secretAsyncClient.getSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponseValue -> { + Secret secret = secretResponseValue; + //Update the not before time of the secret. + secret.notBefore(OffsetDateTime.now().plusDays(50)); + secretAsyncClient.updateSecretWithResponse(secret) + .subscribe(secretResponse -> + System.out.printf("Secret's updated not before time %s \n", + secretResponse.value().notBefore().toString())); + }); + // END: com.azure.keyvault.secrets.secretclient.updateSecretWithResponse#secretBase + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#deleteSecret(String)} + */ + public void deleteSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.deleteSecret#string + secretAsyncClient.deleteSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(deletedSecretResponse -> + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); + // END: com.azure.keyvault.secrets.secretclient.deleteSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#deleteSecretWithResponse(String)} + */ + public void deleteSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string + secretAsyncClient.deleteSecretWithResponse("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(deletedSecretResponse -> + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + // END: com.azure.keyvault.secrets.secretclient.deleteSecretWithResponse#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#deleteSecret(String)} + */ + public void getDeletedSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.getDeletedSecret#string + secretAsyncClient.getDeletedSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(deletedSecretResponse -> + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.recoveryId())); + // END: com.azure.keyvault.secrets.secretclient.getDeletedSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#getDeletedSecretWithResponse(String)} + */ + public void getDeletedSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.getDeletedSecretWithResponse#string + secretAsyncClient.getDeletedSecretWithResponse("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(deletedSecretResponse -> + System.out.printf("Deleted Secret's Recovery Id %s \n", deletedSecretResponse.value().recoveryId())); + // END: com.azure.keyvault.secrets.secretclient.getDeletedSecretWithResponse#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#purgeDeletedSecret(String)} + */ + public void purgeDeletedSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.purgeDeletedSecret#string + secretAsyncClient.purgeDeletedSecret("deletedSecretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(purgeResponse -> + System.out.printf("Purge Status response %d \n", purgeResponse.statusCode())); + // END: com.azure.keyvault.secrets.secretclient.purgeDeletedSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#recoverDeletedSecret(String)} + */ + public void recoverDeletedSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string + secretAsyncClient.recoverDeletedSecret("deletedSecretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(recoveredSecretResponse -> + System.out.printf("Recovered Secret with name %s \n", recoveredSecretResponse.name())); + // END: com.azure.keyvault.secrets.secretclient.recoverDeletedSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#recoverDeletedSecretWithResponse(String)} + */ + public void recoverDeletedSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string + secretAsyncClient.recoverDeletedSecretWithResponse("deletedSecretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(recoveredSecretResponse -> + System.out.printf("Recovered Secret with name %s \n", recoveredSecretResponse.value().name())); + // END: com.azure.keyvault.secrets.secretclient.recoverDeletedSecretWithResponse#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#backupSecret(String)} + */ + public void backupSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.backupSecret#string + secretAsyncClient.backupSecret("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBackupResponse -> + System.out.printf("Secret's Backup Byte array's length %s \n", secretBackupResponse.length)); + // END: com.azure.keyvault.secrets.secretclient.backupSecret#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#backupSecretWithResponse(String)} + */ + public void backupSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.backupSecretWithResponse#string + secretAsyncClient.backupSecretWithResponse("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBackupResponse -> + System.out.printf("Secret's Backup Byte array's length %s \n", secretBackupResponse.value().length)); + // END: com.azure.keyvault.secrets.secretclient.backupSecretWithResponse#string + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#restoreSecret(byte[])} + */ + public void restoreSecretCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.restoreSecret#byte + byte[] secretBackupByteArray = {}; + secretAsyncClient.restoreSecret(secretBackupByteArray) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponse -> System.out.printf("Restored Secret with name %s and value %s \n", + secretResponse.name(), secretResponse.value())); + // END: com.azure.keyvault.secrets.secretclient.restoreSecret#byte + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#restoreSecretWithResponse(byte[])} + */ + public void restoreSecretWithResponseCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.restoreSecretWithResponse#byte + byte[] secretBackupByteArray = {}; + secretAsyncClient.restoreSecretWithResponse(secretBackupByteArray) + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretResponse -> System.out.printf("Restored Secret with name %s and value %s \n", + secretResponse.value().name(), secretResponse.value().value())); + // END: com.azure.keyvault.secrets.secretclient.restoreSecretWithResponse#byte + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#listSecrets()} + */ + public void listSecretsCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.listSecrets + secretAsyncClient.listSecrets() + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBase -> secretAsyncClient.getSecret(secretBase) + .subscribe(secretResponse -> System.out.printf("Received secret with name %s and type %s", + secretResponse.name(), secretResponse.value()))); + // END: com.azure.keyvault.secrets.secretclient.listSecrets + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#listDeletedSecrets()} + */ + public void listDeletedSecretsCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.listDeletedSecrets + secretAsyncClient.listDeletedSecrets() + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(deletedSecretResponse -> System.out.printf("Deleted Secret's Recovery Id %s \n", + deletedSecretResponse.recoveryId())); + // END: com.azure.keyvault.secrets.secretclient.listDeletedSecrets + } + + /** + * Method to insert code snippets for {@link SecretAsyncClient#listSecretVersions(String)} + */ + public void listSecretVersionsCodeSnippets() { + SecretAsyncClient secretAsyncClient = getAsyncSecretClient(); + // BEGIN: com.azure.keyvault.secrets.secretclient.listSecretVersions#string + secretAsyncClient.listSecretVersions("secretName") + .subscriberContext(Context.of(key1, value1, key2, value2)) + .subscribe(secretBase -> secretAsyncClient.getSecret(secretBase) + .subscribe(secretResponse -> System.out.printf("Received secret with name %s and type %s", + secretResponse.name(), secretResponse.value()))); + // END: com.azure.keyvault.secrets.secretclient.listSecretVersions#string + } +} diff --git a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java index 7b92e5986b42..8b1bea4c6f79 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java @@ -3,75 +3,334 @@ package com.azure.security.keyvault.secrets; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.test.models.RecordedData; -import com.azure.core.test.policy.RecordNetworkCallPolicy; +import com.azure.core.http.rest.VoidResponse; +import com.azure.core.util.Context; import com.azure.identity.credential.DefaultAzureCredential; +import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.Secret; import com.azure.security.keyvault.secrets.models.SecretBase; +import java.time.OffsetDateTime; + /** * This class contains code samples for generating javadocs through doclets for {@link SecretClient} */ public final class SecretClientJavaDocCodeSnippets { - /** - * Generates code sample for creating a {@link SecretAsyncClient} - * @return An instance of {@link SecretAsyncClient} - */ - public SecretAsyncClient createAsyncClientWithHttpclient() { - // BEGIN: com.azure.security.keyvault.keys.async.secretclient.withhttpclient.instantiation - RecordedData networkData = new RecordedData(); - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); - SecretAsyncClient keyClient = new SecretClientBuilder() - .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) - .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredential()) - .addPolicy(new RecordNetworkCallPolicy(networkData)) - .httpClient(HttpClient.createDefault()) - .buildAsyncClient(); - // END: com.azure.security.keyvault.keys.async.secretclient.withhttpclient.instantiation - return keyClient; - } + private String key1 = "key1"; + private String key2 = "key2"; + private String value1 = "val1"; + private String value2 = "val2"; /** * Method to insert code snippets for {@link SecretClient#getSecret(SecretBase)} */ - public void getSecret() { + public void getSecretCodeSnippets() { SecretClient secretClient = getSecretClient(); // BEGIN: com.azure.security.keyvault.secretclient.getSecret#secretBase for (SecretBase secret : secretClient.listSecrets()) { - Secret secretWithValue = secretClient.getSecret(secret).value(); + Secret secretWithValue = secretClient.getSecret(secret); System.out.printf("Secret is returned with name %s and value %s %n", secretWithValue.name(), secretWithValue.value()); } // END: com.azure.security.keyvault.secretclient.getSecret#secretBase + + // BEGIN: com.azure.security.keyvault.secretclient.getSecret#string-string + String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; + Secret secretWithVersion = secretClient.getSecret("secretName", secretVersion); + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithVersion.name(), secretWithVersion.value()); + // END: com.azure.security.keyvault.secretclient.getSecret#string-string + + // BEGIN: com.azure.security.keyvault.secretclient.getSecret#string + Secret secretWithoutVersion = secretClient.getSecret("secretName", secretVersion); + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithoutVersion.name(), secretWithoutVersion.value()); + // END: com.azure.security.keyvault.secretclient.getSecret#string } /** - * Implementation for async SecretAsyncClient - * @return sync SecretAsyncClient + * Method to insert code snippets for {@link SecretClient#getSecretWithResponse(String, String, Context)} */ - private SecretAsyncClient getAsyncSecretClient() { + public void getSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.getSecretWithResponse#secretBase + for (SecretBase secret : secretClient.listSecrets()) { + Secret secretWithValue = secretClient.getSecretWithResponse(secret, new Context(key2, value2)).value(); + System.out.printf("Secret is returned with name %s and value %s %n", secretWithValue.name(), + secretWithValue.value()); + } + // END: com.azure.security.keyvault.secretclient.getSecretWithResponse#secretBase - // BEGIN: com.azure.security.keyvault.secretclient.async.construct - SecretAsyncClient secretClient = new SecretClientBuilder() - .credential(new DefaultAzureCredential()) - .endpoint("https://myvault.vault.azure.net/") - .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) - .buildAsyncClient(); - // END: com.azure.security.keyvault.secretclient.async.construct - return secretClient; + // BEGIN: com.azure.security.keyvault.secretclient.getSecretWithResponse#string-string-Context + String secretVersion = "6A385B124DEF4096AF1361A85B16C204"; + Secret secretWithVersion = secretClient.getSecretWithResponse("secretName", secretVersion, + new Context(key2, value2)).value(); + System.out.printf("Secret is returned with name %s and value %s \n", + secretWithVersion.name(), secretWithVersion.value()); + // END: com.azure.security.keyvault.secretclient.getSecretWithResponse#string-string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#setSecret(Secret)} + */ + public void setSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.setSecret#secret + Secret newSecret = new Secret("secretName", "secretValue").expires(OffsetDateTime.now().plusDays(60)); + Secret returnedSecret = secretClient.setSecret(newSecret); + System.out.printf("Secret is created with name %s and value %s \n", returnedSecret.name(), returnedSecret.value()); + // END: com.azure.security.keyvault.secretclient.setSecret#secret + + // BEGIN: com.azure.security.keyvault.secretclient.setSecret#string-string + Secret secret = secretClient.setSecret("secretName", "secretValue"); + System.out.printf("Secret is created with name %s and value %s \n", secret.name(), secret.value()); + // END: com.azure.security.keyvault.secretclient.setSecret#string-string + } + + /** + * Method to insert code snippets for {@link SecretClient#setSecretWithResponse(Secret Context)} + */ + public void setSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.setSecretWithResponse#secret-Context + Secret newSecret = new Secret("secretName", "secretValue").expires(OffsetDateTime.now().plusDays(60)); + Secret secret = secretClient.setSecretWithResponse(newSecret, new Context(key1, value1)).value(); + System.out.printf("Secret is created with name %s and value %s \n", secret.name(), secret.value()); + // END: com.azure.security.keyvault.secretclient.setSecretWithResponse#secret-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#updateSecret(SecretBase)} + */ + public void updateSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.updateSecret#secretBase + Secret secret = secretClient.getSecret("secretName"); + secret.expires(OffsetDateTime.now().plusDays(60)); + SecretBase updatedSecretBase = secretClient.updateSecret(secret); + Secret updatedSecret = secretClient.getSecret(updatedSecretBase.name()); + System.out.printf("Updated Secret is returned with name %s, value %s and expires %s \n", + updatedSecret.name(), updatedSecret.value(), updatedSecret.expires()); + // END: com.azure.security.keyvault.secretclient.updateSecret#secretBase + } + + /** + * Method to insert code snippets for {@link SecretClient#updateSecretWithResponse(SecretBase, Context)} + */ + public void updateSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.updateSecretWithResponse#secretBase-Context + Secret secret = secretClient.getSecret("secretName"); + secret.expires(OffsetDateTime.now().plusDays(60)); + SecretBase updatedSecretBase = secretClient.updateSecretWithResponse(secret, new Context(key2, value2)).value(); + Secret updatedSecret = secretClient.getSecret(updatedSecretBase.name()); + System.out.printf("Updated Secret is returned with name %s, value %s and expires %s \n", + updatedSecret.name(), updatedSecret.value(), updatedSecret.expires()); + // END: com.azure.security.keyvault.secretclient.updateSecretWithResponse#secretBase-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#deleteSecret(String)} + */ + public void deleteSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.deleteSecret#string + DeletedSecret deletedSecret = secretClient.deleteSecret("secretName"); + System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.recoveryId()); + // END: com.azure.security.keyvault.secretclient.deleteSecret#string + } + + /** + * Method to insert code snippets for {@link SecretClient#deleteSecretWithResponse(String, Context)} + */ + public void deleteSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context + DeletedSecret deletedSecret = secretClient.deleteSecretWithResponse("secretName", + new Context(key2, value2)).value(); + System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.recoveryId()); + // END: com.azure.security.keyvault.secretclient.deleteSecretWithResponse#string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#deleteSecret(String)} + */ + public void getDeletedSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.getDeletedSecret#string + DeletedSecret deletedSecret = secretClient.getDeletedSecret("secretName"); + System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.recoveryId()); + // END: com.azure.security.keyvault.secretclient.getDeletedSecret#string + } + + /** + * Method to insert code snippets for {@link SecretClient#getDeletedSecretWithResponse(String, Context)} + */ + public void getDeletedSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.getDeletedSecretWithResponse#string-Context + DeletedSecret deletedSecret = secretClient.getDeletedSecretWithResponse("secretName", + new Context(key2, value2)).value(); + System.out.printf("Deleted Secret's Recovery Id %s", deletedSecret.recoveryId()); + // END: com.azure.security.keyvault.secretclient.getDeletedSecretWithResponse#string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#purgeDeletedSecret(String)} + */ + public void purgeDeletedSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.purgeDeletedSecret#string + VoidResponse purgeResponse = secretClient.purgeDeletedSecret("secretName"); + System.out.printf("Purge Status Code: %d", purgeResponse.statusCode()); + // END: com.azure.security.keyvault.secretclient.purgeDeletedSecret#string + + // BEGIN: com.azure.security.keyvault.secretclient.purgeDeletedSecret#string-Context + VoidResponse purgedResponse = secretClient.purgeDeletedSecret("secretName", new Context(key2, value2)); + System.out.printf("Purge Status Code: %d", purgedResponse.statusCode()); + // END: com.azure.security.keyvault.secretclient.purgeDeletedSecret#string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#recoverDeletedSecret(String)} + */ + public void recoverDeletedSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.recoverDeletedSecret#string + Secret recoveredSecret = secretClient.recoverDeletedSecret("secretName"); + System.out.printf("Recovered Secret with name %s", recoveredSecret.name()); + // END: com.azure.security.keyvault.secretclient.recoverDeletedSecret#string + } + + /** + * Method to insert code snippets for {@link SecretClient#recoverDeletedSecretWithResponse(String, Context)} + */ + public void recoverDeletedSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context + Secret recoveredSecret = secretClient.recoverDeletedSecretWithResponse("secretName", + new Context(key1, value1)).value(); + System.out.printf("Recovered Secret with name %s", recoveredSecret.name()); + // END: com.azure.security.keyvault.secretclient.recoverDeletedSecretWithResponse#string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#backupSecret(String)} + */ + public void backupSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.backupSecret#string + byte[] secretBackup = secretClient.backupSecret("secretName"); + System.out.printf("Secret's Backup Byte array's length %s", secretBackup.length); + // END: com.azure.security.keyvault.secretclient.backupSecret#string + } + + /** + * Method to insert code snippets for {@link SecretClient#backupSecretWithResponse(String, Context)} + */ + public void backupSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.backupSecretWithResponse#string-Context + byte[] secretBackup = secretClient.backupSecretWithResponse("secretName", + new Context(key1, value1)).value(); + System.out.printf("Secret's Backup Byte array's length %s", secretBackup.length); + // END: com.azure.security.keyvault.secretclient.backupSecretWithResponse#string-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#restoreSecret(byte[])} + */ + public void restoreSecretCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.restoreSecret#byte + byte[] secretBackupByteArray = {}; + Secret restoredSecret = secretClient.restoreSecret(secretBackupByteArray); + System.out.printf("Restored Secret with name %s and value %s", restoredSecret.name(), restoredSecret.value()); + // END: com.azure.security.keyvault.secretclient.restoreSecret#byte + } + + /** + * Method to insert code snippets for {@link SecretClient#restoreSecretWithResponse(byte[], Context)} + */ + public void restoreSecretWithResponseCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.restoreSecretWithResponse#byte-Context + byte[] secretBackupByteArray = {}; + Secret restoredSecret = secretClient.restoreSecretWithResponse(secretBackupByteArray, + new Context(key2, value2)).value(); + System.out.printf("Restored Secret with name %s and value %s", restoredSecret.name(), restoredSecret.value()); + // END: com.azure.security.keyvault.secretclient.restoreSecretWithResponse#byte-Context + } + + /** + * Method to insert code snippets for {@link SecretClient#listSecrets()} + */ + public void listSecretsCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.listSecrets + for (SecretBase secret : secretClient.listSecrets()) { + Secret secretWithValue = secretClient.getSecret(secret); + System.out.printf("Received secret with name %s and value %s", + secretWithValue.name(), secretWithValue.value()); + } + // END: com.azure.security.keyvault.secretclient.listSecrets + + // BEGIN: com.azure.security.keyvault.secretclient.listSecrets#Context + for (SecretBase secret : secretClient.listSecrets(new Context(key1, value2))) { + Secret secretWithValue = secretClient.getSecret(secret); + System.out.printf("Received secret with name %s and value %s", + secretWithValue.name(), secretWithValue.value()); + } + // END: com.azure.security.keyvault.secretclient.listSecrets#Context + } + + /** + * Method to insert code snippets for {@link SecretClient#listDeletedSecrets()} + */ + public void listDeletedSecretsCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.listDeletedSecrets + for (DeletedSecret deletedSecret : secretClient.listDeletedSecrets()) { + System.out.printf("Deleted secret's recovery Id %s", deletedSecret.recoveryId()); + } + // END: com.azure.security.keyvault.secretclient.listDeletedSecrets + + // BEGIN: com.azure.security.keyvault.secretclient.listDeletedSecrets#Context + for (DeletedSecret deletedSecret : secretClient.listDeletedSecrets(new Context(key1, value2))) { + System.out.printf("Deleted secret's recovery Id %s", deletedSecret.recoveryId()); + } + // END: com.azure.security.keyvault.secretclient.listDeletedSecrets#Context + } + + /** + * Method to insert code snippets for {@link SecretClient#listSecretVersions(String)} + */ + public void listSecretVersionsCodeSnippets() { + SecretClient secretClient = getSecretClient(); + // BEGIN: com.azure.security.keyvault.secretclient.listSecretVersions#string + for (SecretBase secret : secretClient.listSecretVersions("secretName")) { + Secret secretWithValue = secretClient.getSecret(secret); + System.out.printf("Received secret's version with name %s and value %s", + secretWithValue.name(), secretWithValue.value()); + } + // END: com.azure.security.keyvault.secretclient.listSecretVersions#string + + // BEGIN: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context + for (SecretBase secret : secretClient.listSecretVersions("secretName", new Context(key1, value2))) { + Secret secretWithValue = secretClient.getSecret(secret); + System.out.printf("Received secret's version with name %s and value %s", + secretWithValue.name(), secretWithValue.value()); + } + // END: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context } /** * Implementation for sync SecretClient * @return sync SecretClient */ - private SecretClient getSyncSecretClient() { + private SecretClient getSyncSecretClientCodeSnippets() { // BEGIN: com.azure.security.keyvault.secretclient.sync.construct SecretClient secretClient = new SecretClientBuilder() @@ -83,23 +342,6 @@ private SecretClient getSyncSecretClient() { return secretClient; } - /** - * Generates code sample for creating a {@link SecretAsyncClient} - * @return An instance of {@link SecretAsyncClient} - */ - public SecretAsyncClient createAsyncClientWithPipeline() { - // BEGIN: com.azure.security.keyvault.keys.async.secretclient.pipeline.instantiation - RecordedData networkData = new RecordedData(); - HttpPipeline pipeline = new HttpPipelineBuilder().policies(new RecordNetworkCallPolicy(networkData)).build(); - SecretAsyncClient keyClient = new SecretClientBuilder() - .pipeline(pipeline) - .endpoint("https://myvault.azure.net/") - .credential(new DefaultAzureCredential()) - .buildAsyncClient(); - // END: com.azure.security.keyvault.keys.async.secretclient.pipeline.instantiation - return keyClient; - } - /** * Implementation not provided for this method * @return {@code null} diff --git a/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java b/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java index 1f47223f0b40..3c56735a1e9e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java @@ -100,12 +100,12 @@ public void updateSecret() { StepVerifier.create(client.setSecret(original)) .assertNext(response -> assertSecretEquals(original, response)) .verifyComplete(); - Secret secretToUpdate = client.getSecret(original.name()).block().value(); + Secret secretToUpdate = client.getSecret(original.name()).block(); StepVerifier.create(client.updateSecret(secretToUpdate.expires(updated.expires()))) .assertNext(response -> { - assertNotNull(response.value()); - Assert.assertEquals(original.name(), response.value().name()); + assertNotNull(response); + Assert.assertEquals(original.name(), response.name()); }).verifyComplete(); StepVerifier.create(client.getSecret(original.name())) @@ -146,8 +146,8 @@ public void getSecret() { */ public void getSecretSpecificVersion() { getSecretSpecificVersionRunner((secret, secretWithNewVal) -> { - final Secret secretVersionOne = client.setSecret(secret).block().value(); - final Secret secretVersionTwo = client.setSecret(secretWithNewVal).block().value(); + final Secret secretVersionOne = client.setSecret(secret).block(); + final Secret secretVersionTwo = client.setSecret(secretWithNewVal).block(); StepVerifier.create(client.getSecret(secret.name(), secretVersionOne.version())) .assertNext(response -> assertSecretEquals(secret, response)) @@ -175,16 +175,15 @@ public void deleteSecret() { deleteSecretRunner((secretToDelete) -> { StepVerifier.create(client.setSecret(secretToDelete)) .assertNext(secretResponse -> { - assertSecretEquals(secretToDelete, secretResponse.value()); + assertSecretEquals(secretToDelete, secretResponse); }).verifyComplete(); StepVerifier.create(client.deleteSecret(secretToDelete.name())) .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret.deletedDate()); - assertNotNull(deletedSecret.recoveryId()); - assertNotNull(deletedSecret.scheduledPurgeDate()); - Assert.assertEquals(secretToDelete.name(), deletedSecret.name()); + assertNotNull(deletedSecretResponse.deletedDate()); + assertNotNull(deletedSecretResponse.recoveryId()); + assertNotNull(deletedSecretResponse.scheduledPurgeDate()); + Assert.assertEquals(secretToDelete.name(), deletedSecretResponse.name()); }).verifyComplete(); sleepInRecordMode(30000); @@ -208,24 +207,22 @@ public void getDeletedSecret() { getDeletedSecretRunner((secretToDeleteAndGet) -> { StepVerifier.create(client.setSecret(secretToDeleteAndGet)) .assertNext(secretResponse -> { - assertSecretEquals(secretToDeleteAndGet, secretResponse.value()); + assertSecretEquals(secretToDeleteAndGet, secretResponse); }).verifyComplete(); StepVerifier.create(client.deleteSecret(secretToDeleteAndGet.name())) .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret); + assertNotNull(deletedSecretResponse); }).verifyComplete(); pollOnSecretDeletion(secretToDeleteAndGet.name()); sleepInRecordMode(30000); StepVerifier.create(client.getDeletedSecret(secretToDeleteAndGet.name())) .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret.deletedDate()); - assertNotNull(deletedSecret.recoveryId()); - assertNotNull(deletedSecret.scheduledPurgeDate()); - Assert.assertEquals(secretToDeleteAndGet.name(), deletedSecret.name()); + assertNotNull(deletedSecretResponse.deletedDate()); + assertNotNull(deletedSecretResponse.recoveryId()); + assertNotNull(deletedSecretResponse.scheduledPurgeDate()); + Assert.assertEquals(secretToDeleteAndGet.name(), deletedSecretResponse.name()); }).verifyComplete(); StepVerifier.create(client.purgeDeletedSecret(secretToDeleteAndGet.name())) @@ -252,22 +249,18 @@ public void recoverDeletedSecret() { recoverDeletedSecretRunner((secretToDeleteAndRecover) -> { StepVerifier.create(client.setSecret(secretToDeleteAndRecover)) .assertNext(secretResponse -> { - assertSecretEquals(secretToDeleteAndRecover, secretResponse.value()); + assertSecretEquals(secretToDeleteAndRecover, secretResponse); }).verifyComplete(); StepVerifier.create(client.deleteSecret(secretToDeleteAndRecover.name())) - .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret); - }).verifyComplete(); + .assertNext(Assert::assertNotNull).verifyComplete(); sleepInRecordMode(30000); StepVerifier.create(client.recoverDeletedSecret(secretToDeleteAndRecover.name())) .assertNext(secretResponse -> { - Secret recoveredSecret = secretResponse.value(); - Assert.assertEquals(secretToDeleteAndRecover.name(), recoveredSecret.name()); - Assert.assertEquals(secretToDeleteAndRecover.notBefore(), recoveredSecret.notBefore()); - Assert.assertEquals(secretToDeleteAndRecover.expires(), recoveredSecret.expires()); + Assert.assertEquals(secretToDeleteAndRecover.name(), secretResponse.name()); + Assert.assertEquals(secretToDeleteAndRecover.notBefore(), secretResponse.notBefore()); + Assert.assertEquals(secretToDeleteAndRecover.expires(), secretResponse.expires()); }).verifyComplete(); }); } @@ -287,12 +280,12 @@ public void backupSecret() { backupSecretRunner((secretToBackup) -> { StepVerifier.create(client.setSecret(secretToBackup)) .assertNext(secretResponse -> { - assertSecretEquals(secretToBackup, secretResponse.value()); + assertSecretEquals(secretToBackup, secretResponse); }).verifyComplete(); StepVerifier.create(client.backupSecret(secretToBackup.name())) .assertNext(response -> { - byte[] backupBytes = response.value(); + byte[] backupBytes = response; assertNotNull(backupBytes); assertTrue(backupBytes.length > 0); }).verifyComplete(); @@ -314,15 +307,12 @@ public void restoreSecret() { restoreSecretRunner((secretToBackupAndRestore) -> { StepVerifier.create(client.setSecret(secretToBackupAndRestore)) .assertNext(secretResponse -> { - assertSecretEquals(secretToBackupAndRestore, secretResponse.value()); + assertSecretEquals(secretToBackupAndRestore, secretResponse); }).verifyComplete(); - byte[] backup = client.backupSecret(secretToBackupAndRestore.name()).block().value(); + byte[] backup = client.backupSecret(secretToBackupAndRestore.name()).block(); StepVerifier.create(client.deleteSecret(secretToBackupAndRestore.name())) - .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret); - }).verifyComplete(); + .assertNext(Assert::assertNotNull).verifyComplete(); pollOnSecretDeletion(secretToBackupAndRestore.name()); StepVerifier.create(client.purgeDeletedSecret(secretToBackupAndRestore.name())) @@ -335,10 +325,9 @@ public void restoreSecret() { StepVerifier.create(client.restoreSecret(backup)) .assertNext(response -> { - Secret restoredSecret = response.value(); - Assert.assertEquals(secretToBackupAndRestore.name(), restoredSecret.name()); - Assert.assertEquals(secretToBackupAndRestore.notBefore(), restoredSecret.notBefore()); - Assert.assertEquals(secretToBackupAndRestore.expires(), restoredSecret.expires()); + Assert.assertEquals(secretToBackupAndRestore.name(), response.name()); + Assert.assertEquals(secretToBackupAndRestore.notBefore(), response.notBefore()); + Assert.assertEquals(secretToBackupAndRestore.expires(), response.expires()); }).verifyComplete(); }); } @@ -358,23 +347,19 @@ public void restoreSecretFromMalformedBackup() { @Override public void listDeletedSecrets() { listDeletedSecretsRunner((secrets) -> { - HashMap secretsToDelete = secrets; List deletedSecrets = new ArrayList<>(); - for (Secret secret : secretsToDelete.values()) { + for (Secret secret : secrets.values()) { StepVerifier.create(client.setSecret(secret)) .assertNext(secretResponse -> { - assertSecretEquals(secret, secretResponse.value()); + assertSecretEquals(secret, secretResponse); }).verifyComplete(); } sleepInRecordMode(10000); - for (Secret secret : secretsToDelete.values()) { + for (Secret secret : secrets.values()) { StepVerifier.create(client.deleteSecret(secret.name())) - .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret); - }).verifyComplete(); + .assertNext(Assert::assertNotNull).verifyComplete(); pollOnSecretDeletion(secret.name()); } @@ -383,14 +368,14 @@ public void listDeletedSecrets() { sleepInRecordMode(30000); for (DeletedSecret actualSecret : deletedSecrets) { - if (secretsToDelete.containsKey(actualSecret.name())) { + if (secrets.containsKey(actualSecret.name())) { assertNotNull(actualSecret.deletedDate()); assertNotNull(actualSecret.recoveryId()); - secretsToDelete.remove(actualSecret.name()); + secrets.remove(actualSecret.name()); } } - assertEquals(0, secretsToDelete.size()); + assertEquals(0, secrets.size()); for (DeletedSecret deletedSecret : deletedSecrets) { StepVerifier.create(client.purgeDeletedSecret(deletedSecret.name())) @@ -408,25 +393,21 @@ public void listDeletedSecrets() { @Override public void listSecretVersions() { listSecretVersionsRunner((secrets) -> { - List secretVersions = secrets; List output = new ArrayList<>(); String secretName = null; - for (Secret secret : secretVersions) { + for (Secret secret : secrets) { secretName = secret.name(); - client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse.value())); + client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); client.listSecretVersions(secretName).subscribe(output::add); sleepInRecordMode(30000); - assertEquals(secretVersions.size(), output.size()); + assertEquals(secrets.size(), output.size()); StepVerifier.create(client.deleteSecret(secretName)) - .assertNext(deletedSecretResponse -> { - DeletedSecret deletedSecret = deletedSecretResponse.value(); - assertNotNull(deletedSecret); - }).verifyComplete(); + .assertNext(Assert::assertNotNull).verifyComplete(); pollOnSecretDeletion(secretName); @@ -447,7 +428,7 @@ public void listSecrets() { HashMap secretsToList = secrets; List output = new ArrayList<>(); for (Secret secret : secretsToList.values()) { - client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse.value())); + client.setSecret(secret).subscribe(secretResponse -> assertSecretEquals(secret, secretResponse)); sleepInRecordMode(1000); } sleepInRecordMode(30000); @@ -466,43 +447,39 @@ public void listSecrets() { }); } - private DeletedSecret pollOnSecretDeletion(String secretName) { + private void pollOnSecretDeletion(String secretName) { int pendingPollCount = 0; while (pendingPollCount < 30) { DeletedSecret deletedSecret = null; try { - deletedSecret = client.getDeletedSecret(secretName).block().value(); + deletedSecret = client.getDeletedSecret(secretName).block(); } catch (ResourceNotFoundException e) { } if (deletedSecret == null) { sleepInRecordMode(2000); pendingPollCount += 1; - continue; } else { - return deletedSecret; + return; } } System.err.printf("Deleted Secret %s not found \n", secretName); - return null; } - private DeletedSecret pollOnSecretPurge(String secretName) { + private void pollOnSecretPurge(String secretName) { int pendingPollCount = 0; while (pendingPollCount < 10) { DeletedSecret deletedSecret = null; try { - deletedSecret = client.getDeletedSecret(secretName).block().value(); + deletedSecret = client.getDeletedSecret(secretName).block(); } catch (ResourceNotFoundException e) { } if (deletedSecret != null) { sleepInRecordMode(2000); pendingPollCount += 1; - continue; } else { - return deletedSecret; + return; } } System.err.printf("Deleted Secret %s was not purged \n", secretName); - return null; } } diff --git a/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java b/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java index 3500c5dec3c7..12cfe2a3b84f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java @@ -14,7 +14,6 @@ import io.netty.handler.codec.http.HttpResponseStatus; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import static org.junit.Assert.assertEquals; @@ -85,7 +84,7 @@ public void setSecretNull() { public void updateSecret() { updateSecretRunner((original, updated) -> { assertSecretEquals(original, client.setSecret(original)); - Secret secretToUpdate = client.getSecret(original.name()).value(); + Secret secretToUpdate = client.getSecret(original.name()); client.updateSecret(secretToUpdate.expires(updated.expires())); assertSecretEquals(updated, client.getSecret(original.name())); }); @@ -116,8 +115,8 @@ public void getSecret() { */ public void getSecretSpecificVersion() { getSecretSpecificVersionRunner((secret, secretWithNewVal) -> { - Secret secretVersionOne = client.setSecret(secret).value(); - Secret secretVersionTwo = client.setSecret(secretWithNewVal).value(); + Secret secretVersionOne = client.setSecret(secret); + Secret secretVersionTwo = client.setSecret(secretWithNewVal); assertSecretEquals(secret, client.getSecret(secretVersionOne.name(), secretVersionOne.version())); assertSecretEquals(secretWithNewVal, client.getSecret(secretVersionTwo.name(), secretVersionTwo.version())); }); @@ -136,7 +135,7 @@ public void getSecretNotFound() { public void deleteSecret() { deleteSecretRunner((secretToDelete) -> { assertSecretEquals(secretToDelete, client.setSecret(secretToDelete)); - DeletedSecret deletedSecret = client.deleteSecret(secretToDelete.name()).value(); + DeletedSecret deletedSecret = client.deleteSecret(secretToDelete.name()); pollOnSecretDeletion(secretToDelete.name()); assertNotNull(deletedSecret.deletedDate()); assertNotNull(deletedSecret.recoveryId()); @@ -157,10 +156,10 @@ public void deleteSecretNotFound() { public void getDeletedSecret() { getDeletedSecretRunner((secretToDeleteAndGet) -> { assertSecretEquals(secretToDeleteAndGet, client.setSecret(secretToDeleteAndGet)); - assertNotNull(client.deleteSecret(secretToDeleteAndGet.name()).value()); + assertNotNull(client.deleteSecret(secretToDeleteAndGet.name())); pollOnSecretDeletion(secretToDeleteAndGet.name()); sleepInRecordMode(30000); - DeletedSecret deletedSecret = client.getDeletedSecret(secretToDeleteAndGet.name()).value(); + DeletedSecret deletedSecret = client.getDeletedSecret(secretToDeleteAndGet.name()); assertNotNull(deletedSecret.deletedDate()); assertNotNull(deletedSecret.recoveryId()); assertNotNull(deletedSecret.scheduledPurgeDate()); @@ -185,9 +184,9 @@ public void getDeletedSecretNotFound() { public void recoverDeletedSecret() { recoverDeletedSecretRunner((secretToDeleteAndRecover) -> { assertSecretEquals(secretToDeleteAndRecover, client.setSecret(secretToDeleteAndRecover)); - assertNotNull(client.deleteSecret(secretToDeleteAndRecover.name()).value()); + assertNotNull(client.deleteSecret(secretToDeleteAndRecover.name())); pollOnSecretDeletion(secretToDeleteAndRecover.name()); - Secret recoveredSecret = client.recoverDeletedSecret(secretToDeleteAndRecover.name()).value(); + Secret recoveredSecret = client.recoverDeletedSecret(secretToDeleteAndRecover.name()); assertEquals(secretToDeleteAndRecover.name(), recoveredSecret.name()); assertEquals(secretToDeleteAndRecover.notBefore(), recoveredSecret.notBefore()); assertEquals(secretToDeleteAndRecover.expires(), recoveredSecret.expires()); @@ -207,7 +206,7 @@ public void recoverDeletedSecretNotFound() { public void backupSecret() { backupSecretRunner((secretToBackup) -> { assertSecretEquals(secretToBackup, client.setSecret(secretToBackup)); - byte[] backupBytes = (client.backupSecret(secretToBackup.name()).value()); + byte[] backupBytes = (client.backupSecret(secretToBackup.name())); assertNotNull(backupBytes); assertTrue(backupBytes.length > 0); }); @@ -226,7 +225,7 @@ public void backupSecretNotFound() { public synchronized void restoreSecret() { restoreSecretRunner((secretToBackupAndRestore) -> { assertSecretEquals(secretToBackupAndRestore, client.setSecret(secretToBackupAndRestore)); - byte[] backupBytes = (client.backupSecret(secretToBackupAndRestore.name()).value()); + byte[] backupBytes = (client.backupSecret(secretToBackupAndRestore.name())); assertNotNull(backupBytes); assertTrue(backupBytes.length > 0); client.deleteSecret(secretToBackupAndRestore.name()); @@ -234,7 +233,7 @@ public synchronized void restoreSecret() { client.purgeDeletedSecret(secretToBackupAndRestore.name()); pollOnSecretPurge(secretToBackupAndRestore.name()); sleepInRecordMode(60000); - Secret restoredSecret = client.restoreSecret(backupBytes).value(); + Secret restoredSecret = client.restoreSecret(backupBytes); assertEquals(secretToBackupAndRestore.name(), restoredSecret.name()); assertEquals(secretToBackupAndRestore.expires(), restoredSecret.expires()); }); @@ -253,13 +252,12 @@ public void restoreSecretFromMalformedBackup() { */ public void listSecrets() { listSecretsRunner((secrets) -> { - HashMap secretsToList = secrets; - for (Secret secret : secretsToList.values()) { + for (Secret secret : secrets.values()) { assertSecretEquals(secret, client.setSecret(secret)); } for (SecretBase actualSecret : client.listSecrets()) { - if (secretsToList.containsKey(actualSecret.name())) { + if (secrets.containsKey(actualSecret.name())) { Secret expectedSecret = secrets.get(actualSecret.name()); assertEquals(expectedSecret.expires(), actualSecret.expires()); assertEquals(expectedSecret.notBefore(), actualSecret.notBefore()); @@ -277,12 +275,11 @@ public void listSecrets() { public void listDeletedSecrets() { listDeletedSecretsRunner((secrets) -> { - HashMap secretsToDelete = secrets; - for (Secret secret : secretsToDelete.values()) { + for (Secret secret : secrets.values()) { assertSecretEquals(secret, client.setSecret(secret)); } - for (Secret secret : secretsToDelete.values()) { + for (Secret secret : secrets.values()) { client.deleteSecret(secret.name()); pollOnSecretDeletion(secret.name()); } @@ -290,14 +287,14 @@ public void listDeletedSecrets() { sleepInRecordMode(60000); Iterable deletedSecrets = client.listDeletedSecrets(); for (DeletedSecret actualSecret : deletedSecrets) { - if (secretsToDelete.containsKey(actualSecret.name())) { + if (secrets.containsKey(actualSecret.name())) { assertNotNull(actualSecret.deletedDate()); assertNotNull(actualSecret.recoveryId()); - secretsToDelete.remove(actualSecret.name()); + secrets.remove(actualSecret.name()); } } - assertEquals(0, secretsToDelete.size()); + assertEquals(0, secrets.size()); for (DeletedSecret deletedSecret : deletedSecrets) { client.purgeDeletedSecret(deletedSecret.name()); @@ -334,43 +331,39 @@ public void listSecretVersions() { } - private DeletedSecret pollOnSecretDeletion(String secretName) { + private void pollOnSecretDeletion(String secretName) { int pendingPollCount = 0; while (pendingPollCount < 30) { DeletedSecret deletedSecret = null; try { - deletedSecret = client.getDeletedSecret(secretName).value(); + deletedSecret = client.getDeletedSecret(secretName); } catch (ResourceNotFoundException e) { } if (deletedSecret == null) { sleepInRecordMode(2000); pendingPollCount += 1; - continue; } else { - return deletedSecret; + return; } } System.err.printf("Deleted Secret %s not found \n", secretName); - return null; } - private DeletedSecret pollOnSecretPurge(String secretName) { + private void pollOnSecretPurge(String secretName) { int pendingPollCount = 0; while (pendingPollCount < 10) { DeletedSecret deletedSecret = null; try { - deletedSecret = client.getDeletedSecret(secretName).value(); + deletedSecret = client.getDeletedSecret(secretName); } catch (ResourceNotFoundException e) { } if (deletedSecret != null) { sleepInRecordMode(2000); pendingPollCount += 1; - continue; } else { - return deletedSecret; + return; } } System.err.printf("Deleted Secret %s was not purged \n", secretName); - return null; } } diff --git a/storage/client/blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md similarity index 97% rename from storage/client/blob/CHANGELOG.md rename to sdk/storage/azure-storage-blob/CHANGELOG.md index 32e9b8a3e4a4..27a9660550d7 100644 --- a/storage/client/blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -7,7 +7,7 @@ https://aka.ms/azure-sdk-preview1-java. **Breaking changes: New API design** - Operations are now scoped to a particular client: - - `StorageClient`: StorageURL's functionality was migrated to StorageClient. This client handles account-level operations. This includes managing service properties and listing the containers within an account. + - `BlobServiceClient`: StorageURL's functionality was migrated to BlobServiceClient. This client handles account-level operations. This includes managing service properties and listing the containers within an account. - `ContainerClient`: ContainerURL's functionality was migrated to ContainerClient. The client handles operations for a particular container. This includes creating or deleting that container, as well as listing the blobs within that container. - `BlobClient`: BlobURL's functionality was migrated to BlobClient, TransferManager download functionality was migrated to BlobClient and TransferManager upload functionality was migrated to BlockBlobClient. The client handles most operations, excluding upload, for an individual blob, including downloading data and working with blob properties. There are subclients (BlockBlobClient, PageBlobClient, AppendBlobClient) available for their respective blob types on the service. diff --git a/storage/client/blob/README.md b/sdk/storage/azure-storage-blob/README.md similarity index 86% rename from storage/client/blob/README.md rename to sdk/storage/azure-storage-blob/README.md index 5a90220c5ed7..cb3fa9b3e7a2 100644 --- a/storage/client/blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -23,7 +23,7 @@ definition, such as text or binary data. com.azure azure-storage-blob - 12.0.0-preview.1 + 12.0.0-preview.2 ``` @@ -97,9 +97,9 @@ Blob storage is designed for: The following sections provide several code snippets covering some of the most common Azure Storage Blob tasks, including: -- [Create storage client](#create-storage-client) -- [Create container client](#create-container-client) -- [Create blob client](#create-blob-client) +- [Create BlobServiceClient](#create-blobserviceclient) +- [Create ContainerClient](#create-containerclient) +- [Create BlobClient](#create-blobclient) - [Create a container](#create-a-container) - [Upload a blob from InputStream](#uploading-a-blob-from-a-stream) - [Upload a blob from File](#uploading-a-blob-from-file) @@ -108,70 +108,70 @@ The following sections provide several code snippets covering some of the most c - [Enumerating blobs](#enumerating-blobs) - [Authenticate with Azure.Identity](#authenticate-with-azureidentity) -### Create storage client +### Create BlobServiceClient -Create a storage client using the [`sasToken`](#get-credentials) generated above. +Create a BlobServiceClient using the [`sasToken`](#get-credentials) generated above. ```java -StorageClient storageClient = StorageClient.builder() +BlobServiceClient blobServiceClient = new BlobServiceClientBuilder() .endpoint("") .credential("") - .build(); + .buildClient(); ``` -### Create container client +### Create ContainerClient -Create a container client if storage client exists. +Create a ContainerClient if a BlobServiceClient exists. ```java -ContainerClient containerClient = storageClient.getContainerClient("mycontainer"); +ContainerClient containerClient = blobServiceClient.getContainerClient("mycontainer"); ``` or -Create the container client from the builder [`sasToken`](#get-credentials) generated above. +Create the ContainerClient from the builder [`sasToken`](#get-credentials) generated above. ```java -ContainerClient containerClient = ContainerClient.builder() +ContainerClient containerClient = new ContainerClientBuilder() .endpoint("") .credential("") .containerName("mycontainer") - .build(); + .buildClient(); ``` -### Create blob client +### Create BlobClient -Create a blob client if container client exists. +Create a BlobClient if container client exists. ```java BlobClient blobClient = containerClient.getBlobClient("myblob"); ``` or -Create the blob client from the builder [`sasToken`](#get-credentials) generated above. +Create the BlobClient from the builder [`sasToken`](#get-credentials) generated above. ```java -BlobClient blobClient = BlobClient.builder() +BlobClient blobClient = new BlobClientBuilder() .endpoint("") .credential("") .containerName("mycontainer") .blobName("myblob") - .build(); + .buildBlobClient(); ``` ### Create a container -Create a container from storage client. +Create a container from a BlobServiceClient. ```java -storageClient.createContainer("mycontainer"); +blobServiceClient.createContainer("mycontainer"); ``` or -Create a container using container client. +Create a container using ContainerClient. ```java containerClient.create(); ``` ### Uploading a blob from a stream -Upload data stream to a blob using blockBlobClient generated from containerClient. +Upload data stream to a blob using BlockBlobClient generated from a ContainerClient. ```java BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob"); @@ -183,7 +183,7 @@ try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBy ### Uploading a blob from `File` -Upload a file to a blob using blockBlobClient generated from containerClient. +Upload a file to a blob using BlockBlobClient generated from ContainerClient. ```java BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob"); @@ -192,7 +192,7 @@ blobClient.uploadFromFile("local-file.jpg"); ### Downloading a blob to output stream -Download blob to output stream using blobClient. +Download blob to output stream using BlobClient. ```java try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream("downloaded-file.jpg")) { @@ -202,14 +202,14 @@ try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream("downloaded-f ### Downloading a blob to local path -Download blob to local file using blobClient. +Download blob to local file using BlobClient. ```java blobClient.downloadToFile("downloaded-file.jpg"); ``` ### Enumerating blobs -Enumerating all blobs using `ContainerClient` +Enumerating all blobs using ContainerClient ```java containerClient.listBlobsFlat() .forEach( @@ -222,7 +222,7 @@ containerClient.listBlobsFlat() The [Azure Identity library][identity] provides Azure Active Directory support for authenticating with Azure Storage. ```java -StorageClient storageClient = StorageClient.storageClientBuilder() +BlobServiceClient storageClient = BlobServiceClient.storageClientBuilder() .endpoint(endpoint) .credential(new DefaultAzureCredential()) .buildClient(); diff --git a/storage/client/blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml similarity index 98% rename from storage/client/blob/pom.xml rename to sdk/storage/azure-storage-blob/pom.xml index b661ff0ad7e2..00132d720cd8 100644 --- a/storage/client/blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -49,7 +49,7 @@ com.azure azure-core - 1.0.0-preview.2 + 1.0.0-preview.3 org.slf4j @@ -69,7 +69,7 @@ com.azure azure-core-test - 1.0.0-preview.2 + 1.0.0-preview.3 test diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASPermission.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASPermission.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASPermission.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASResourceType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASResourceType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASResourceType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASResourceType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASService.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASService.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASService.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASService.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASSignatureValues.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AccountSASSignatureValues.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AccountSASSignatureValues.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java index d54b264702f6..d5b1b30df030 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AnonymousCredentialPolicy.java @@ -13,7 +13,7 @@ * Anonymous credentials are to be used with with HTTP(S) requests that read blobs from public containers or requests * that use a Shared Access Signature (SAS). This is because Anonymous credentials will not set an Authorization header. * Pass an instance of this class as the credentials parameter when creating a new pipeline (typically with - * {@link StorageClient}). + * {@link BlobServiceClient}). */ public final class AnonymousCredentialPolicy implements HttpPipelinePolicy { diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java index 7275f0fb326f..af64a840c8cc 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java @@ -32,7 +32,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link StorageAsyncClient}. + * and operations on the service are available on {@link BlobServiceAsyncClient}. * *

* Please refer diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java index 246fe645af17..65468a2e42b5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/AppendBlobClient.java @@ -31,7 +31,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, - * and operations on the service are available on {@link StorageClient}. + * and operations on the service are available on {@link BlobServiceClient}. * *

* Please refer to the Azure Docs diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java similarity index 78% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index c8ceb3f311d3..ad598f8a8983 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -59,7 +59,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link StorageAsyncClient}. + * and operations on the service are available on {@link BlobServiceAsyncClient}. * *

* Please refer to the Azure @@ -71,7 +71,6 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -@SuppressWarnings({"unused", "WeakerAccess"}) public class BlobAsyncClient { private static final int BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE = 4 * Constants.MB; private static final int BLOB_MAX_DOWNLOAD_BLOCK_SIZE = 100 * Constants.MB; @@ -98,7 +97,7 @@ public class BlobAsyncClient { public BlockBlobAsyncClient asBlockBlobAsyncClient() { return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -110,7 +109,7 @@ public BlockBlobAsyncClient asBlockBlobAsyncClient() { public AppendBlobAsyncClient asAppendBlobAsyncClient() { return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -122,12 +121,12 @@ public AppendBlobAsyncClient asAppendBlobAsyncClient() { public PageBlobAsyncClient asPageBlobAsyncClient() { return new PageBlobAsyncClient(new AzureBlobStorageBuilder() .url(getBlobUrl().toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** * Initializes a {@link ContainerAsyncClient} object pointing to the container this blob is in. This method does not - * create a container. It simply constructs the URL to the container and offers access to methods relevant to + * create a container. It simply constructs the client to the container and offers access to methods relevant to * containers. * * @return A {@link ContainerAsyncClient} object pointing to the container containing the blob @@ -136,7 +135,7 @@ public ContainerAsyncClient getContainerAsyncClient() { BlobURLParts parts = URLParser.parse(getBlobUrl()); return new ContainerAsyncClient(new AzureBlobStorageBuilder() .url(String.format("%s://%s/%s", parts.scheme(), parts.host(), parts.containerName())) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -147,18 +146,22 @@ public ContainerAsyncClient getContainerAsyncClient() { */ public URL getBlobUrl() { try { - UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.url()); + UrlBuilder urlBuilder = UrlBuilder.parse(azureBlobStorage.getUrl()); if (snapshot != null) { urlBuilder.query("snapshot=" + snapshot); } return urlBuilder.toURL(); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } /** - * Gets if the blob this client represents exists in the cloud. + * Determines if the blob this client represents exists in the cloud. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.exists} * * @return true if the blob exists, false if it doesn't */ @@ -172,8 +175,14 @@ public Mono> exists() { } /** - * Copies the data at the source URL to a blob. For more information, see the - * Azure Docs + * Copies the data at the source URL to a blob. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL} + * + *

For more information, see the + * Azure Docs

* * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @return A reactive response containing the copy ID for the long running operation. @@ -183,8 +192,14 @@ public Mono> startCopyFromURL(URL sourceURL) { } /** - * Copies the data at the source URL to a blob. For more information, see the - * Azure Docs + * Copies the data at the source URL to a blob. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

* * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata {@link Metadata} @@ -217,6 +232,13 @@ public Mono> startCopyFromURL(URL sourceURL, Metadata metadata, /** * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String} + * + *

For more information, see the + * Azure Docs

+ * * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link * BlobStartCopyFromURLHeaders} object. * @return A reactive response signalling completion. @@ -228,6 +250,13 @@ public Mono abortCopyFromURL(String copyId) { /** * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String-LeaseAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link * BlobStartCopyFromURLHeaders} object. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does @@ -243,6 +272,13 @@ public Mono abortCopyFromURL(String copyId, LeaseAccessConditions /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL} + * + *

For more information, see the + * Azure Docs

+ * * @param copySource The source URL to copy from. * @return A reactive response containing the copy ID for the long running operation. */ @@ -253,6 +289,13 @@ public Mono> copyFromURL(URL copySource) { /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata {@link Metadata} * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access @@ -285,23 +328,37 @@ public Mono> copyFromURL(URL copySource, Metadata metadata, Mod * Reads the entire blob. Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or * {@link AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.download} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response containing the blob data. */ public Mono>> download() { - return this.download(null, null, false, null); + return this.download(null, null, null, false); } /** * Reads a range of bytes from a blob. Uploading data must be done from the {@link BlockBlobClient}, {@link * PageBlobClient}, or {@link AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean} + * + *

For more information, see the + * Azure Docs

+ * * @param range {@link BlobRange} + * @param options {@link ReliableDownloadOptions} * @param accessConditions {@link BlobAccessConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @param options {@link ReliableDownloadOptions} * @return A reactive response containing the blob data. */ - public Mono>> download(BlobRange range, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, ReliableDownloadOptions options) { + public Mono>> download(BlobRange range, ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { return this.download(range, accessConditions, rangeGetContentMD5) .map(response -> new SimpleResponse<>( response.rawResponse(), @@ -359,11 +416,18 @@ Mono download(BlobRange range, BlobAccessConditions acces * This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra call, * use the other overload providing the {@link BlobRange} parameter. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.downloadToFile#String} + * + *

For more information, see the + * Azure Docs

+ * * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. * @return An empty response */ public Mono downloadToFile(String filePath) { - return this.downloadToFile(filePath, null, BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE, null, false, null); + return this.downloadToFile(filePath, null, BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE, null, null, false); } /** @@ -374,18 +438,25 @@ public Mono downloadToFile(String filePath) { * This method makes an extra HTTP call to get the length of the blob in the beginning. To avoid this extra call, * provide the {@link BlobRange} parameter. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean} + * + *

For more information, see the + * Azure Docs

+ * * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. * @param range {@link BlobRange} * @param blockSize the size of a chunk to download at a time, in bytes + * @param options {@link ReliableDownloadOptions} * @param accessConditions {@link BlobAccessConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. - * @param options {@link ReliableDownloadOptions} * @return An empty response * @throws IllegalArgumentException If {@code blockSize} is less than 0 or greater than 100MB. * @throws UncheckedIOException If an I/O error occurs. */ - public Mono downloadToFile(String filePath, BlobRange range, Integer blockSize, BlobAccessConditions accessConditions, - boolean rangeGetContentMD5, ReliableDownloadOptions options) { + public Mono downloadToFile(String filePath, BlobRange range, Integer blockSize, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5) { if (blockSize < 0 || blockSize > BLOB_MAX_DOWNLOAD_BLOCK_SIZE) { throw new IllegalArgumentException("Block size should not exceed 100MB"); } @@ -440,6 +511,13 @@ private List sliceBlobRange(BlobRange blobRange, Integer blockSize) { /** * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.delete} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response signalling completion. */ public Mono delete() { @@ -449,6 +527,13 @@ public Mono delete() { /** * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being * deleted, you must pass null. @@ -468,6 +553,13 @@ public Mono delete(DeleteSnapshotsOptionType deleteBlobSnapshotOpt /** * Returns the blob's metadata and properties. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getProperties} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response containing the blob properties and metadata. */ public Mono> getProperties() { @@ -477,6 +569,13 @@ public Mono> getProperties() { /** * Returns the blob's metadata and properties. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getProperties#BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param accessConditions {@link BlobAccessConditions} * @return A reactive response containing the blob properties and metadata. */ @@ -492,9 +591,14 @@ public Mono> getProperties(BlobAccessConditions accessC /** * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. For more information, - * see the - * Azure Docs. + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders} + * + *

For more information, see the + * Azure Docs

* * @param headers {@link BlobHTTPHeaders} * @return A reactive response signalling completion. @@ -505,9 +609,14 @@ public Mono setHTTPHeaders(BlobHTTPHeaders headers) { /** * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. For more information, - * see the - * Azure Docs. + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

* * @param headers {@link BlobHTTPHeaders} * @param accessConditions {@link BlobAccessConditions} @@ -524,8 +633,14 @@ public Mono setHTTPHeaders(BlobHTTPHeaders headers, BlobAccessCond /** * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. For more information, see the - * Azure Docs. + * must be preserved, they must be downloaded and included in the call to this method. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata} + * + *

For more information, see the + * Azure Docs

* * @param metadata {@link Metadata} * @return A reactive response signalling completion. @@ -536,8 +651,14 @@ public Mono setMetadata(Metadata metadata) { /** * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. For more information, see the - * Azure Docs. + * must be preserved, they must be downloaded and included in the call to this method. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

* * @param metadata {@link Metadata} * @param accessConditions {@link BlobAccessConditions} @@ -557,6 +678,13 @@ public Mono setMetadata(Metadata metadata, BlobAccessConditions ac /** * Creates a read-only snapshot of a blob. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.createSnapshot} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response containing the ID of the new snapshot. */ public Mono> createSnapshot() { @@ -566,6 +694,13 @@ public Mono> createSnapshot() { /** * Creates a read-only snapshot of a blob. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.createSnapshot#Metadata-BlobAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param metadata {@link Metadata} * @param accessConditions {@link BlobAccessConditions} * @return A reactive response containing the ID of the new snapshot. @@ -587,6 +722,13 @@ public Mono> createSnapshot(Metadata metadata, BlobAccessCondit * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's * etag. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier} + * + *

For more information, see the + * Azure Docs

+ * * @param tier The new tier for the blob. * @return A reactive response signalling completion. */ @@ -600,6 +742,13 @@ public Mono setTier(AccessTier tier) { * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's * etag. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier-LeaseAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param tier The new tier for the blob. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. @@ -616,6 +765,13 @@ public Mono setTier(AccessTier tier, LeaseAccessConditions leaseAc /** * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.undelete} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response signalling completion. */ public Mono undelete() { @@ -628,6 +784,13 @@ public Mono undelete() { * Acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 * seconds, or infinite (-1). * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int} + * + *

For more information, see the + * Azure Docs

+ * * @param proposedId A {@code String} in any valid GUID format. May be null. * @param duration The duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A * non-infinite lease can be between 15 and 60 seconds. @@ -641,7 +804,14 @@ public Mono> acquireLease(String proposedId, int duration) { * Acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 * seconds, or infinite (-1). * - * @param proposedID A {@code String} in any valid GUID format. May be null. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int-ModifiedAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * + * @param proposedId A {@code String} in any valid GUID format. May be null. * @param duration The duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A * non-infinite lease can be between 15 and 60 seconds. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -650,7 +820,7 @@ public Mono> acquireLease(String proposedId, int duration) { * @return A reactive response containing the lease ID. * @throws IllegalArgumentException If {@code duration} is outside the bounds of 15 to 60 or isn't -1. */ - public Mono> acquireLease(String proposedID, int duration, ModifiedAccessConditions modifiedAccessConditions) { + public Mono> acquireLease(String proposedId, int duration, ModifiedAccessConditions modifiedAccessConditions) { if (!(duration == -1 || (duration >= 15 && duration <= 60))) { // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until // subscription. @@ -658,7 +828,7 @@ public Mono> acquireLease(String proposedID, int duration, Modi } return postProcessResponse(this.azureBlobStorage.blobs().acquireLeaseWithRestResponseAsync( - null, null, null, duration, proposedID, null, + null, null, null, duration, proposedId, null, modifiedAccessConditions, Context.NONE)) .map(rb -> new SimpleResponse<>(rb, rb.deserializedHeaders().leaseId())); } @@ -666,50 +836,78 @@ public Mono> acquireLease(String proposedID, int duration, Modi /** * Renews the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.renewLease#String} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @return A reactive response containing the renewed lease ID. */ - public Mono> renewLease(String leaseID) { - return this.renewLease(leaseID, null); + public Mono> renewLease(String leaseId) { + return this.renewLease(leaseId, null); } /** * Renews the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.renewLease#String-ModifiedAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @return A reactive response containing the renewed lease ID. */ - public Mono> renewLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions) { + public Mono> renewLease(String leaseId, ModifiedAccessConditions modifiedAccessConditions) { return postProcessResponse(this.azureBlobStorage.blobs().renewLeaseWithRestResponseAsync(null, - null, leaseID, null, null, modifiedAccessConditions, Context.NONE)) + null, leaseId, null, null, modifiedAccessConditions, Context.NONE)) .map(rb -> new SimpleResponse<>(rb, rb.deserializedHeaders().leaseId())); } /** * Releases the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.releaseLease#String} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @return A reactive response signalling completion. */ - public Mono releaseLease(String leaseID) { - return this.releaseLease(leaseID, null); + public Mono releaseLease(String leaseId) { + return this.releaseLease(leaseId, null); } /** * Releases the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.releaseLease#String-ModifiedAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @return A reactive response signalling completion. */ - public Mono releaseLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions) { + public Mono releaseLease(String leaseId, ModifiedAccessConditions modifiedAccessConditions) { return postProcessResponse(this.azureBlobStorage.blobs().releaseLeaseWithRestResponseAsync(null, - null, leaseID, null, null, modifiedAccessConditions, Context.NONE)) + null, leaseId, null, null, modifiedAccessConditions, Context.NONE)) .map(VoidResponse::new); } @@ -717,6 +915,13 @@ public Mono releaseLease(String leaseID, ModifiedAccessConditions * BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant * to break a fixed-duration lease when it expires or an infinite lease immediately. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.breakLease} + * + *

For more information, see the + * Azure Docs

+ * * @return A reactive response containing the remaining time in the broken lease in seconds. */ public Mono> breakLease() { @@ -727,6 +932,13 @@ public Mono> breakLease() { * BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant * to break a fixed-duration lease when it expires or an infinite lease immediately. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.breakLease#Integer-ModifiedAccessConditions} + * + *

For more information, see the + * Azure Docs

+ * * @param breakPeriodInSeconds An optional {@code Integer} representing the proposed duration of seconds that the * lease should continue before it is broken, between 0 and 60 seconds. This break period is only used if it is * shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease @@ -746,38 +958,56 @@ public Mono> breakLease(Integer breakPeriodInSeconds, Modified /** * ChangeLease changes the blob's lease ID. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.changeLease#String-String} + * + *

For more information, see the + * Azure Docs

+ * * @param leaseId The leaseId of the active lease on the blob. - * @param proposedID A {@code String} in any valid GUID format. + * @param proposedId A {@code String} in any valid GUID format. * @return A reactive response containing the new lease ID. */ - public Mono> changeLease(String leaseId, String proposedID) { - return this.changeLease(leaseId, proposedID, null); + public Mono> changeLease(String leaseId, String proposedId) { + return this.changeLease(leaseId, proposedId, null); } /** - * ChangeLease changes the blob's lease ID. For more information, see the Azure - * Docs. + * ChangeLease changes the blob's lease ID. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.changeLease#String-String-ModifiedAccessConditions} + * + *

For more information, see the + * Azure Docs

* * @param leaseId The leaseId of the active lease on the blob. - * @param proposedID A {@code String} in any valid GUID format. + * @param proposedId A {@code String} in any valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @return A reactive response containing the new lease ID. */ - public Mono> changeLease(String leaseId, String proposedID, ModifiedAccessConditions modifiedAccessConditions) { + public Mono> changeLease(String leaseId, String proposedId, ModifiedAccessConditions modifiedAccessConditions) { return postProcessResponse(this.azureBlobStorage.blobs().changeLeaseWithRestResponseAsync(null, - null, leaseId, proposedID, null, null, modifiedAccessConditions, Context.NONE)) + null, leaseId, proposedId, null, null, modifiedAccessConditions, Context.NONE)) .map(rb -> new SimpleResponse<>(rb, rb.deserializedHeaders().leaseId())); } /** - * Returns the sku name and account kind for the account. For more information, please see the Azure Docs. + * Returns the sku name and account kind for the account. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getAccountInfo} + * + *

For more information, see the + * Azure Docs

* * @return a reactor response containing the sku name and account kind. */ - // TODO (unknown): determine this return type public Mono> getAccountInfo() { return postProcessResponse( this.azureBlobStorage.blobs().getAccountInfoWithRestResponseAsync(null, null, Context.NONE)) @@ -925,7 +1155,7 @@ public String generateSAS(String identifier, BlobSASPermission permissions, Offs cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); SharedKeyCredential sharedKeyCredential = - Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); @@ -944,7 +1174,7 @@ ServiceSASSignatureValues configureServiceSASSignatureValues(ServiceSASSignature String accountName) { // Set canonical name - serviceSASSignatureValues.canonicalName(this.azureBlobStorage.url(), accountName); + serviceSASSignatureValues.canonicalName(this.azureBlobStorage.getUrl(), accountName); // Set snapshotId serviceSASSignatureValues.snapshotId(getSnapshotId()); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java similarity index 72% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index e2c6eab47a76..c88bac43c0da 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -39,13 +39,12 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, and - * operations on the service are available on {@link StorageClient}. + * operations on the service are available on {@link BlobServiceClient}. * *

* Please refer to the Azure * Docs for more information. */ -@SuppressWarnings({"unused", "WeakerAccess"}) public class BlobClient { private final BlobAsyncClient blobAsyncClient; @@ -136,6 +135,10 @@ public final BlobInputStream openInputStream(BlobRange range, BlobAccessConditio /** * Gets if the container this client represents exists in the cloud. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.exists} + * * @return true if the container exists, false if it doesn't */ public Response exists() { @@ -145,6 +148,10 @@ public Response exists() { /** * Gets if the container this client represents exists in the cloud. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.exists#Duration} + * * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return true if the container exists, false if it doesn't */ @@ -155,8 +162,14 @@ public Response exists(Duration timeout) { } /** - * Copies the data at the source URL to a blob. For more information, see the - * Azure Docs + * Copies the data at the source URL to a blob. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.startCopyFromURL#URL} + * + *

For more information, see the + * Azure Docs

* * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @return The copy ID for the long running operation. @@ -166,8 +179,14 @@ public Response startCopyFromURL(URL sourceURL) { } /** - * Copies the data at the source URL to a blob. For more information, see the - * Azure Docs + * Copies the data at the source URL to a blob. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

* * @param sourceURL The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata {@link Metadata} @@ -179,9 +198,8 @@ public Response startCopyFromURL(URL sourceURL) { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The copy ID for the long running operation. */ - public Response startCopyFromURL(URL sourceURL, Metadata metadata, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, - Duration timeout) { + public Response startCopyFromURL(URL sourceURL, Metadata metadata, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Duration timeout) { Mono> response = blobAsyncClient .startCopyFromURL(sourceURL, metadata, sourceModifiedAccessConditions, destAccessConditions); @@ -191,6 +209,13 @@ public Response startCopyFromURL(URL sourceURL, Metadata metadata, /** * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.abortCopyFromURL#String} + * + *

For more information, see the + * Azure Docs

+ * * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link * BlobStartCopyFromURLHeaders} object. * @return A response containing status code and HTTP headers. @@ -202,6 +227,13 @@ public VoidResponse abortCopyFromURL(String copyId) { /** * Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.abortCopyFromURL#String-LeaseAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param copyId The id of the copy operation to abort. Returned as the {@code copyId} field on the {@link * BlobStartCopyFromURLHeaders} object. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does @@ -219,6 +251,13 @@ public VoidResponse abortCopyFromURL(String copyId, LeaseAccessConditions leaseA /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.copyFromURL#URL} + * + *

For more information, see the + * Azure Docs

+ * * @param copySource The source URL to copy from. * @return The copy ID for the long running operation. */ @@ -229,6 +268,13 @@ public Response copyFromURL(URL copySource) { /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param copySource The source URL to copy from. URLs outside of Azure may only be copied to block blobs. * @param metadata {@link Metadata} * @param sourceModifiedAccessConditions {@link ModifiedAccessConditions} against the source. Standard HTTP Access @@ -239,9 +285,8 @@ public Response copyFromURL(URL copySource) { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The copy ID for the long running operation. */ - public Response copyFromURL(URL copySource, Metadata metadata, - ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, - Duration timeout) { + public Response copyFromURL(URL copySource, Metadata metadata, ModifiedAccessConditions sourceModifiedAccessConditions, + BlobAccessConditions destAccessConditions, Duration timeout) { Mono> response = blobAsyncClient .copyFromURL(copySource, metadata, sourceModifiedAccessConditions, destAccessConditions); @@ -252,6 +297,13 @@ public Response copyFromURL(URL copySource, Metadata metadata, * Downloads the entire blob into an output stream. Uploading data must be done from the {@link BlockBlobClient}, * {@link PageBlobClient}, or {@link AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.download#OutputStream} + * + *

For more information, see the + * Azure Docs

+ * * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. * @return A response containing status code and HTTP headers. * @throws UncheckedIOException If an I/O error occurs. @@ -264,19 +316,26 @@ public VoidResponse download(OutputStream stream) { * Downloads a range of bytes from a blob into an output stream. Uploading data must be done from the {@link * BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.download#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param stream A non-null {@link OutputStream} instance where the downloaded data will be written. - * @param options {@link ReliableDownloadOptions} * @param range {@link BlobRange} + * @param options {@link ReliableDownloadOptions} * @param accessConditions {@link BlobAccessConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return A response containing status code and HTTP headers. * @throws UncheckedIOException If an I/O error occurs. */ - public VoidResponse download(OutputStream stream, ReliableDownloadOptions options, BlobRange range, + public VoidResponse download(OutputStream stream, BlobRange range, ReliableDownloadOptions options, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout) { Mono download = blobAsyncClient - .download(range, accessConditions, rangeGetContentMD5, options) + .download(range, options, accessConditions, rangeGetContentMD5) .flatMapMany(res -> res.value() .doOnNext(bf -> { try { @@ -296,10 +355,17 @@ public VoidResponse download(OutputStream stream, ReliableDownloadOptions option * Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link * AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.downloadToFile#String} + * + *

For more information, see the + * Azure Docs

+ * * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. - * @throws IOException If an I/O error occurs + * @throws UncheckedIOException If an I/O error occurs */ - public void downloadToFile(String filePath) throws IOException { + public void downloadToFile(String filePath) { blobAsyncClient.downloadToFile(filePath); } @@ -308,29 +374,39 @@ public void downloadToFile(String filePath) throws IOException { * Uploading data must be done from the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link * AppendBlobClient}. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param filePath A non-null {@link OutputStream} instance where the downloaded data will be written. - * @param options {@link ReliableDownloadOptions} * @param range {@link BlobRange} * @param blockSize the size of a chunk to download at a time, in bytes + * @param options {@link ReliableDownloadOptions} * @param accessConditions {@link BlobAccessConditions} * @param rangeGetContentMD5 Whether the contentMD5 for the specified blob range should be returned. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. - * @throws IOException If an I/O error occurs + * @throws UncheckedIOException If an I/O error occurs */ - public void downloadToFile(String filePath, ReliableDownloadOptions options, BlobRange range, Integer blockSize, - BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout) throws IOException { - Mono download = blobAsyncClient.downloadToFile(filePath, range, blockSize, accessConditions, rangeGetContentMD5, options); + public void downloadToFile(String filePath, BlobRange range, Integer blockSize, ReliableDownloadOptions options, + BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Duration timeout) { + Mono download = blobAsyncClient.downloadToFile(filePath, range, blockSize, options, accessConditions, rangeGetContentMD5); - try { - Utility.blockWithOptionalTimeout(download, timeout); - } catch (UncheckedIOException e) { - throw e.getCause(); - } + Utility.blockWithOptionalTimeout(download, timeout); } /** * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.delete} + * + *

For more information, see the + * Azure Docs

+ * * @return A response containing status code and HTTP headers. */ public VoidResponse delete() { @@ -340,6 +416,13 @@ public VoidResponse delete() { /** * Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param deleteBlobSnapshotOptions Specifies the behavior for deleting the snapshots on this blob. {@code Include} * will delete the base blob and all snapshots. {@code Only} will delete only the snapshots. If a snapshot is being * deleted, you must pass null. @@ -358,6 +441,13 @@ public VoidResponse delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, /** * Returns the blob's metadata and properties. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.getProperties} + * + *

For more information, see the + * Azure Docs

+ * * @return The blob properties and metadata. */ public Response getProperties() { @@ -367,6 +457,13 @@ public Response getProperties() { /** * Returns the blob's metadata and properties. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.getProperties#BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The blob properties and metadata. @@ -380,9 +477,14 @@ public Response getProperties(BlobAccessConditions accessConditi /** * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. For more information, - * see the - * Azure Docs. + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders} + * + *

For more information, see the + * Azure Docs

* * @param headers {@link BlobHTTPHeaders} * @return A response containing status code and HTTP headers. @@ -393,9 +495,14 @@ public VoidResponse setHTTPHeaders(BlobHTTPHeaders headers) { /** * Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In - * order to preserve existing values, they must be passed alongside the header being changed. For more information, - * see the - * Azure Docs. + * order to preserve existing values, they must be passed alongside the header being changed. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

* * @param headers {@link BlobHTTPHeaders} * @param accessConditions {@link BlobAccessConditions} @@ -412,8 +519,14 @@ public VoidResponse setHTTPHeaders(BlobHTTPHeaders headers, BlobAccessConditions /** * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. For more information, see the - * Azure Docs. + * must be preserved, they must be downloaded and included in the call to this method. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setMetadata#Metadata} + * + *

For more information, see the + * Azure Docs

* * @param metadata {@link Metadata} * @return A response containing status code and HTTP headers. @@ -424,8 +537,14 @@ public VoidResponse setMetadata(Metadata metadata) { /** * Changes a blob's metadata. The specified metadata in this method will replace existing metadata. If old values - * must be preserved, they must be downloaded and included in the call to this method. For more information, see the - * Azure Docs. + * must be preserved, they must be downloaded and included in the call to this method. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setMetadata#Metadata-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

* * @param metadata {@link Metadata} * @param accessConditions {@link BlobAccessConditions} @@ -442,6 +561,13 @@ public VoidResponse setMetadata(Metadata metadata, BlobAccessConditions accessCo /** * Creates a read-only snapshot of a blob. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.createSnapshot} + * + *

For more information, see the + * Azure Docs

+ * * @return The ID of the new snapshot. */ public Response createSnapshot() { @@ -451,6 +577,13 @@ public Response createSnapshot() { /** * Creates a read-only snapshot of a blob. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.createSnapshot#Metadata-BlobAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param metadata {@link Metadata} * @param accessConditions {@link BlobAccessConditions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. @@ -469,6 +602,13 @@ public Response createSnapshot(Metadata metadata, BlobAccessConditions a * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's * etag. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setTier#AccessTier} + * + *

For more information, see the + * Azure Docs

+ * * @param tier The new tier for the blob. * @return A response containing status code and HTTP headers. */ @@ -482,6 +622,13 @@ public VoidResponse setTier(AccessTier tier) { * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's * etag. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param tier The new tier for the blob. * @param leaseAccessConditions By setting lease access conditions, requests will fail if the provided lease does * not match the active lease on the blob. @@ -498,6 +645,13 @@ public VoidResponse setTier(AccessTier tier, LeaseAccessConditions leaseAccessCo /** * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.undelete} + * + *

For more information, see the + * Azure Docs

+ * * @return A response containing status code and HTTP headers. */ public VoidResponse undelete() { @@ -507,6 +661,13 @@ public VoidResponse undelete() { /** * Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.undelete#Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return A response containing status code and HTTP headers. */ @@ -521,6 +682,13 @@ public VoidResponse undelete(Duration timeout) { * Acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 * seconds, or infinite (-1). * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.acquireLease#String-int} + * + *

For more information, see the + * Azure Docs

+ * * @param proposedId A {@code String} in any valid GUID format. May be null. * @param duration The duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A * non-infinite lease can be between 15 and 60 seconds. @@ -534,7 +702,14 @@ public Response acquireLease(String proposedId, int duration) { * Acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 * seconds, or infinite (-1). * - * @param proposedID A {@code String} in any valid GUID format. May be null. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.acquireLease#String-int-ModifiedAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * + * @param proposedId A {@code String} in any valid GUID format. May be null. * @param duration The duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A * non-infinite lease can be between 15 and 60 seconds. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and @@ -543,10 +718,10 @@ public Response acquireLease(String proposedId, int duration) { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The lease ID. */ - public Response acquireLease(String proposedID, int duration, + public Response acquireLease(String proposedId, int duration, ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { Mono> response = blobAsyncClient - .acquireLease(proposedID, duration, modifiedAccessConditions); + .acquireLease(proposedId, duration, modifiedAccessConditions); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -554,27 +729,40 @@ public Response acquireLease(String proposedID, int duration, /** * Renews the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.renewLease#String} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @return The renewed lease ID. */ - public Response renewLease(String leaseID) { - return this.renewLease(leaseID, null, null); + public Response renewLease(String leaseId) { + return this.renewLease(leaseId, null, null); } /** * Renews the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.renewLease#String-ModifiedAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The renewed lease ID. */ - public Response renewLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions, - Duration timeout) { + public Response renewLease(String leaseId, ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { Mono> response = blobAsyncClient - .renewLease(leaseID, modifiedAccessConditions); + .renewLease(leaseId, modifiedAccessConditions); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -582,27 +770,39 @@ public Response renewLease(String leaseID, ModifiedAccessConditions modi /** * Releases the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.releaseLease#String} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @return A response containing status code and HTTP headers. */ - public VoidResponse releaseLease(String leaseID) { - return this.releaseLease(leaseID, null, null); + public VoidResponse releaseLease(String leaseId) { + return this.releaseLease(leaseId, null, null); } /** * Releases the blob's previously-acquired lease. * - * @param leaseID The leaseId of the active lease on the blob. + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.releaseLease#String-ModifiedAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * + * @param leaseId The leaseId of the active lease on the blob. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return A response containing status code and HTTP headers. */ - public VoidResponse releaseLease(String leaseID, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { - Mono response = blobAsyncClient - .releaseLease(leaseID, modifiedAccessConditions); + public VoidResponse releaseLease(String leaseId, ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { + Mono response = blobAsyncClient.releaseLease(leaseId, modifiedAccessConditions); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -611,6 +811,13 @@ public VoidResponse releaseLease(String leaseID, * BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant * to break a fixed-duration lease when it expires or an infinite lease immediately. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.breakLease} + * + *

For more information, see the + * Azure Docs

+ * * @return The remaining time in the broken lease in seconds. */ public Response breakLease() { @@ -621,6 +828,13 @@ public Response breakLease() { * BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant * to break a fixed-duration lease when it expires or an infinite lease immediately. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.breakLease#Integer-ModifiedAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

+ * * @param breakPeriodInSeconds An optional {@code Integer} representing the proposed duration of seconds that the * lease should continue before it is broken, between 0 and 60 seconds. This break period is only used if it is * shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease @@ -632,8 +846,7 @@ public Response breakLease() { * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The remaining time in the broken lease in seconds. */ - public Response breakLease(Integer breakPeriodInSeconds, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { + public Response breakLease(Integer breakPeriodInSeconds, ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { Mono> response = blobAsyncClient .breakLease(breakPeriodInSeconds, modifiedAccessConditions); @@ -643,37 +856,54 @@ public Response breakLease(Integer breakPeriodInSeconds, /** * ChangeLease changes the blob's lease ID. * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.changeLease#String-String} + * + *

For more information, see the + * Azure Docs

+ * * @param leaseId The leaseId of the active lease on the blob. - * @param proposedID A {@code String} in any valid GUID format. + * @param proposedId A {@code String} in any valid GUID format. * @return The new lease ID. */ - public Response changeLease(String leaseId, String proposedID) { - return this.changeLease(leaseId, proposedID, null, null); + public Response changeLease(String leaseId, String proposedId) { + return this.changeLease(leaseId, proposedId, null, null); } /** - * ChangeLease changes the blob's lease ID. For more information, see the Azure - * Docs. + * ChangeLease changes the blob's lease ID. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.changeLease#String-String-ModifiedAccessConditions-Duration} + * + *

For more information, see the + * Azure Docs

* * @param leaseId The leaseId of the active lease on the blob. - * @param proposedID A {@code String} in any valid GUID format. + * @param proposedId A {@code String} in any valid GUID format. * @param modifiedAccessConditions Standard HTTP Access conditions related to the modification of data. ETag and * LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given * request. The request will fail if the specified condition is not satisfied. * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The new lease ID. */ - public Response changeLease(String leaseId, String proposedID, - ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { - Mono> response = blobAsyncClient - .changeLease(leaseId, proposedID, modifiedAccessConditions); + public Response changeLease(String leaseId, String proposedId, ModifiedAccessConditions modifiedAccessConditions, Duration timeout) { + Mono> response = blobAsyncClient.changeLease(leaseId, proposedId, modifiedAccessConditions); return Utility.blockWithOptionalTimeout(response, timeout); } /** - * Returns the sku name and account kind for the account. For more information, please see the Azure Docs. + * Returns the sku name and account kind for the account. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.getAccountInfo} + * + *

For more information, see the + * Azure Docs

* * @return The sku name and account kind. */ @@ -682,8 +912,14 @@ public Response getAccountInfo() { } /** - * Returns the sku name and account kind for the account. For more information, please see the Azure Docs. + * Returns the sku name and account kind for the account. + * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobClient.getAccountInfo#Duration} + * + *

For more information, see the + * Azure Docs

* * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @return The sku name and account kind. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index b0e3c98d8904..4467ea5f6a01 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -120,7 +121,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobConfiguration.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobConfiguration.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobConfiguration.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobInputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobInputStream.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobInputStream.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobInputStream.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobOutputStream.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobProperties.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobSASPermission.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index 9e4d0fb2140f..4738c234387b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -32,7 +32,7 @@ import static com.azure.storage.blob.Utility.postProcessResponse; /** - * Client to a storage account. It may only be instantiated through a {@link StorageClientBuilder}. This class does not + * Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does not * hold any state about a particular storage account but is instead a convenient way of sending off appropriate requests * to the resource on the service. It may also be used to construct URLs to blobs and containers. * @@ -50,15 +50,15 @@ * operation, until {@code .subscribe()} is called on the reactive response. You can simply convert one of these * responses to a {@link java.util.concurrent.CompletableFuture} object through {@link Mono#toFuture()}. */ -public final class StorageAsyncClient { +public final class BlobServiceAsyncClient { private final AzureBlobStorageImpl azureBlobStorage; /** - * Package-private constructor for use by {@link StorageClientBuilder}. + * Package-private constructor for use by {@link BlobServiceClientBuilder}. * * @param azureBlobStorageBuilder the API client builder for blob storage API */ - StorageAsyncClient(AzureBlobStorageBuilder azureBlobStorageBuilder) { + BlobServiceAsyncClient(AzureBlobStorageBuilder azureBlobStorageBuilder) { this.azureBlobStorage = azureBlobStorageBuilder.build(); } @@ -73,7 +73,7 @@ public final class StorageAsyncClient { public ContainerAsyncClient getContainerAsyncClient(String containerName) { return new ContainerAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getAccountUrl(), containerName).toString()) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -125,9 +125,9 @@ public Mono deleteContainer(String containerName) { */ public URL getAccountUrl() { try { - return new URL(azureBlobStorage.url()); + return new URL(azureBlobStorage.getUrl()); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } @@ -318,7 +318,7 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS accountSASSignatureValues.ipRange(ipRange); accountSASSignatureValues.protocol(sasProtocol); - SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + SharedKeyCredential sharedKeyCredential = Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); SASQueryParameters sasQueryParameters = accountSASSignatureValues.generateSASQueryParameters(sharedKeyCredential); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java similarity index 89% rename from storage/client/blob/src/main/java/com/azure/storage/blob/StorageClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 5749b1b3fe7d..782e766330ab 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -24,7 +24,7 @@ import java.time.OffsetDateTime; /** - * Client to a storage account. It may only be instantiated through a {@link StorageClientBuilder}. This class does not + * Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does not * hold any state about a particular storage account but is instead a convenient way of sending off appropriate requests * to the resource on the service. It may also be used to construct URLs to blobs and containers. * @@ -36,16 +36,16 @@ * Please see here for more * information on containers. */ -public final class StorageClient { - private final StorageAsyncClient storageAsyncClient; +public final class BlobServiceClient { + private final BlobServiceAsyncClient blobServiceAsyncClient; /** - * Package-private constructor for use by {@link StorageClientBuilder}. + * Package-private constructor for use by {@link BlobServiceClientBuilder}. * - * @param storageAsyncClient the async storage account client + * @param blobServiceAsyncClient the async storage account client */ - StorageClient(StorageAsyncClient storageAsyncClient) { - this.storageAsyncClient = storageAsyncClient; + BlobServiceClient(BlobServiceAsyncClient blobServiceAsyncClient) { + this.blobServiceAsyncClient = blobServiceAsyncClient; } /** @@ -56,7 +56,7 @@ public final class StorageClient { * @return A {@link ContainerClient} object pointing to the specified container */ public ContainerClient getContainerClient(String containerName) { - return new ContainerClient(storageAsyncClient.getContainerAsyncClient(containerName)); + return new ContainerClient(blobServiceAsyncClient.getContainerAsyncClient(containerName)); } /** @@ -96,7 +96,7 @@ public Response createContainer(String containerName, Metadata * @return A response containing status code and HTTP headers */ public VoidResponse deleteContainer(String containerName) { - return storageAsyncClient.deleteContainer(containerName).block(); + return blobServiceAsyncClient.deleteContainer(containerName).block(); } /** @@ -105,7 +105,7 @@ public VoidResponse deleteContainer(String containerName) { * @return the URL. */ public URL getAccountUrl() { - return storageAsyncClient.getAccountUrl(); + return blobServiceAsyncClient.getAccountUrl(); } /** @@ -129,7 +129,7 @@ public Iterable listContainers() { * @return The list of containers. */ public Iterable listContainers(ListContainersOptions options, Duration timeout) { - Flux response = storageAsyncClient.listContainers(options); + Flux response = blobServiceAsyncClient.listContainers(options); return timeout == null ? response.toIterable() : response.timeout(timeout).toIterable(); } @@ -153,7 +153,7 @@ public Response getProperties() { */ public Response getProperties(Duration timeout) { - Mono> response = storageAsyncClient.getProperties(); + Mono> response = blobServiceAsyncClient.getProperties(); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -182,7 +182,7 @@ public VoidResponse setProperties(StorageServiceProperties properties) { * @return The storage account properties. */ public VoidResponse setProperties(StorageServiceProperties properties, Duration timeout) { - Mono response = storageAsyncClient.setProperties(properties); + Mono response = blobServiceAsyncClient.setProperties(properties); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -210,7 +210,7 @@ public Response getUserDelegationKey(OffsetDateTime start, Of */ public Response getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry, Duration timeout) { - Mono> response = storageAsyncClient.getUserDelegationKey(start, expiry); + Mono> response = blobServiceAsyncClient.getUserDelegationKey(start, expiry); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -237,7 +237,7 @@ public Response getStatistics() { * @return The storage account statistics. */ public Response getStatistics(Duration timeout) { - Mono> response = storageAsyncClient.getStatistics(); + Mono> response = blobServiceAsyncClient.getStatistics(); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -260,7 +260,7 @@ public Response getAccountInfo() { * @return The storage account info. */ public Response getAccountInfo(Duration timeout) { - Mono> response = storageAsyncClient.getAccountInfo(); + Mono> response = blobServiceAsyncClient.getAccountInfo(); return Utility.blockWithOptionalTimeout(response, timeout); } @@ -276,7 +276,7 @@ public Response getAccountInfo(Duration timeout) { */ public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission, OffsetDateTime expiryTime) { - return this.storageAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime); + return this.blobServiceAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime); } /** @@ -295,6 +295,6 @@ public String generateAccountSAS(AccountSASService accountSASService, AccountSAS public String generateAccountSAS(AccountSASService accountSASService, AccountSASResourceType accountSASResourceType, AccountSASPermission accountSASPermission, OffsetDateTime expiryTime, OffsetDateTime startTime, String version, IPRange ipRange, SASProtocol sasProtocol) { - return this.storageAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); + return this.blobServiceAsyncClient.generateAccountSAS(accountSASService, accountSASResourceType, accountSASPermission, expiryTime, startTime, version, ipRange, sasProtocol); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java similarity index 78% rename from storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index fbbdc0f438ac..114924273c6c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -34,8 +35,8 @@ import java.util.Objects; /** - * Fluent StorageClientBuilder for instantiating a {@link StorageClient} or {@link StorageAsyncClient} - * using {@link StorageClientBuilder#buildClient()} or {@link StorageClientBuilder#buildAsyncClient()} respectively. + * Fluent BlobServiceClientBuilder for instantiating a {@link BlobServiceClient} or {@link BlobServiceAsyncClient} + * using {@link BlobServiceClientBuilder#buildClient()} or {@link BlobServiceClientBuilder#buildAsyncClient()} respectively. * *

* The following information must be provided on this builder: @@ -47,9 +48,9 @@ * *

* Once all the configurations are set on this builder, call {@code .buildClient()} to create a - * {@link StorageClient} or {@code .buildAsyncClient()} to create a {@link StorageAsyncClient}. + * {@link BlobServiceClient} or {@code .buildAsyncClient()} to create a {@link BlobServiceAsyncClient}. */ -public final class StorageClientBuilder { +public final class BlobServiceClientBuilder { private static final String ACCOUNT_NAME = "accountname"; private static final String ACCOUNT_KEY = "accountkey"; private static final String ENDPOINT_PROTOCOL = "defaultendpointsprotocol"; @@ -67,10 +68,10 @@ public final class StorageClientBuilder { private Configuration configuration; /** - * Creates a builder instance that is able to configure and construct {@link StorageClient StorageClients} - * and {@link StorageAsyncClient StorageAsyncClients}. + * Creates a builder instance that is able to configure and construct {@link BlobServiceClient BlobServiceClients} + * and {@link BlobServiceAsyncClient BlobServiceAsyncClients}. */ - public StorageClientBuilder() { + public BlobServiceClientBuilder() { retryOptions = new RequestRetryOptions(); logLevel = HttpLogDetailLevel.NONE; policies = new ArrayList<>(); @@ -104,7 +105,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); @@ -115,32 +116,32 @@ private AzureBlobStorageBuilder buildImpl() { } /** - * Creates a {@link StorageClient} based on options set in the Builder. + * Creates a {@link BlobServiceClient} based on options set in the Builder. * - * @return a {@link StorageClient} created from the configurations in this builder. + * @return a {@link BlobServiceClient} created from the configurations in this builder. * @throws NullPointerException If {@code endpoint} is {@code null}. */ - public StorageClient buildClient() { - return new StorageClient(buildAsyncClient()); + public BlobServiceClient buildClient() { + return new BlobServiceClient(buildAsyncClient()); } /** - * Creates a {@link StorageAsyncClient} based on options set in the Builder. + * Creates a {@link BlobServiceAsyncClient} based on options set in the Builder. * - * @return a {@link StorageAsyncClient} created from the configurations in this builder. + * @return a {@link BlobServiceAsyncClient} created from the configurations in this builder. * @throws NullPointerException If {@code endpoint} is {@code null}. */ - public StorageAsyncClient buildAsyncClient() { - return new StorageAsyncClient(buildImpl()); + public BlobServiceAsyncClient buildAsyncClient() { + return new BlobServiceAsyncClient(buildImpl()); } /** * Sets the blob service endpoint, additionally parses it for information (SAS token, queue name) * @param endpoint URL of the service - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws IllegalArgumentException If {@code endpoint} is {@code null} or is a malformed URL. */ - public StorageClientBuilder endpoint(String endpoint) { + public BlobServiceClientBuilder endpoint(String endpoint) { try { URL url = new URL(endpoint); this.endpoint = url.getProtocol() + "://" + url.getAuthority(); @@ -167,7 +168,7 @@ String endpoint() { * @return the updated ContainerClientBuilder object * @throws NullPointerException If {@code credential} is {@code null}. */ - public StorageClientBuilder credential(SharedKeyCredential credential) { + public BlobServiceClientBuilder credential(SharedKeyCredential credential) { this.sharedKeyCredential = Objects.requireNonNull(credential); this.tokenCredential = null; this.sasTokenCredential = null; @@ -177,10 +178,10 @@ public StorageClientBuilder credential(SharedKeyCredential credential) { /** * Sets the credential used to authorize requests sent to the service * @param credential authorization credential - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws NullPointerException If {@code credential} is {@code null}. */ - public StorageClientBuilder credential(TokenCredential credential) { + public BlobServiceClientBuilder credential(TokenCredential credential) { this.tokenCredential = Objects.requireNonNull(credential); this.sharedKeyCredential = null; this.sasTokenCredential = null; @@ -190,10 +191,10 @@ public StorageClientBuilder credential(TokenCredential credential) { /** * Sets the credential used to authorize requests sent to the service * @param credential authorization credential - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws NullPointerException If {@code credential} is {@code null}. */ - public StorageClientBuilder credential(SASTokenCredential credential) { + public BlobServiceClientBuilder credential(SASTokenCredential credential) { this.sasTokenCredential = Objects.requireNonNull(credential); this.sharedKeyCredential = null; this.tokenCredential = null; @@ -202,9 +203,9 @@ public StorageClientBuilder credential(SASTokenCredential credential) { /** * Clears the credential used to authorize requests sent to the service - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object */ - public StorageClientBuilder anonymousCredential() { + public BlobServiceClientBuilder anonymousCredential() { this.sharedKeyCredential = null; this.tokenCredential = null; this.sasTokenCredential = null; @@ -214,10 +215,10 @@ public StorageClientBuilder anonymousCredential() { /** * Sets the connection string for the service, parses it for authentication information (account name, account key) * @param connectionString connection string from access keys section - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws IllegalArgumentException If {@code connectionString} doesn't contain AccountName or AccountKey. */ - public StorageClientBuilder connectionString(String connectionString) { + public BlobServiceClientBuilder connectionString(String connectionString) { Objects.requireNonNull(connectionString); Map connectionKVPs = new HashMap<>(); @@ -247,10 +248,10 @@ public StorageClientBuilder connectionString(String connectionString) { /** * Sets the http client used to send service requests * @param httpClient http client to send requests - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws NullPointerException If {@code httpClient} is {@code null}. */ - public StorageClientBuilder httpClient(HttpClient httpClient) { + public BlobServiceClientBuilder httpClient(HttpClient httpClient) { this.httpClient = Objects.requireNonNull(httpClient); return this; } @@ -258,10 +259,10 @@ public StorageClientBuilder httpClient(HttpClient httpClient) { /** * Adds a pipeline policy to apply on each request sent * @param pipelinePolicy a pipeline policy - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws NullPointerException If {@code pipelinePolicy} is {@code null}. */ - public StorageClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { + public BlobServiceClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { this.policies.add(Objects.requireNonNull(pipelinePolicy)); return this; } @@ -269,9 +270,9 @@ public StorageClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { /** * Sets the logging level for service requests * @param logLevel logging level - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object */ - public StorageClientBuilder httpLogDetailLevel(HttpLogDetailLevel logLevel) { + public BlobServiceClientBuilder httpLogDetailLevel(HttpLogDetailLevel logLevel) { this.logLevel = logLevel; return this; } @@ -280,9 +281,9 @@ public StorageClientBuilder httpLogDetailLevel(HttpLogDetailLevel logLevel) { * Sets the configuration object used to retrieve environment configuration values used to buildClient the client with * when they are not set in the appendBlobClientBuilder, defaults to Configuration.NONE * @param configuration configuration store - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object */ - public StorageClientBuilder configuration(Configuration configuration) { + public BlobServiceClientBuilder configuration(Configuration configuration) { this.configuration = configuration; return this; } @@ -290,10 +291,10 @@ public StorageClientBuilder configuration(Configuration configuration) { /** * Sets the request retry options for all the requests made through the client. * @param retryOptions the options to configure retry behaviors - * @return the updated StorageClientBuilder object + * @return the updated BlobServiceClientBuilder object * @throws NullPointerException If {@code retryOptions} is {@code null}. */ - public StorageClientBuilder retryOptions(RequestRetryOptions retryOptions) { + public BlobServiceClientBuilder retryOptions(RequestRetryOptions retryOptions) { this.retryOptions = Objects.requireNonNull(retryOptions); return this; } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobURLParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java similarity index 93% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlobURLParts.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java index 1200e960f750..5c629e719ca3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlobURLParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobURLParts.java @@ -76,14 +76,14 @@ public BlobURLParts host(String host) { } /** - * The container name or {@code null} if a {@link StorageAsyncClient} was parsed. + * The container name or {@code null} if a {@link BlobServiceAsyncClient} was parsed. */ public String containerName() { return containerName; } /** - * The container name or {@code null} if a {@link StorageAsyncClient} was parsed. + * The container name or {@code null} if a {@link BlobServiceAsyncClient} was parsed. */ public BlobURLParts containerName(String containerName) { this.containerName = containerName; @@ -91,14 +91,14 @@ public BlobURLParts containerName(String containerName) { } /** - * The blob name or {@code null} if a {@link StorageAsyncClient} or {@link ContainerAsyncClient} was parsed. + * The blob name or {@code null} if a {@link BlobServiceAsyncClient} or {@link ContainerAsyncClient} was parsed. */ public String blobName() { return blobName; } /** - * The blob name or {@code null} if a {@link StorageAsyncClient} or {@link ContainerAsyncClient} was parsed. + * The blob name or {@code null} if a {@link BlobServiceAsyncClient} or {@link ContainerAsyncClient} was parsed. */ public BlobURLParts blobName(String blobName) { this.blobName = blobName; diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java index cdb0a06fa68e..ffb2eddc60b8 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java @@ -50,7 +50,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link StorageAsyncClient}. + * and operations on the service are available on {@link BlobServiceAsyncClient}. * *

* Please refer diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java index 6af92555c2b0..69bad81c7ff2 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlockBlobClient.java @@ -36,7 +36,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, - * and operations on the service are available on {@link StorageClient}. + * and operations on the service are available on {@link BlobServiceClient}. * *

* Please refer to the Azure Docs diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/Constants.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/Constants.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/Constants.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/Constants.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java index 936bab693252..67bd29d4d381 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerAsyncClient.java @@ -41,13 +41,13 @@ /** * Client to a container. It may only be instantiated through a {@link ContainerClientBuilder} or via the method {@link - * StorageAsyncClient#getContainerAsyncClient(String)}. This class does not hold any state about a particular blob but + * BlobServiceAsyncClient#getContainerAsyncClient(String)}. This class does not hold any state about a particular blob but * is instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used * to construct URLs to blobs. * *

* This client contains operations on a container. Operations on a blob are available on {@link BlobAsyncClient} through - * {@link #getBlobAsyncClient(String)}, and operations on the service are available on {@link StorageAsyncClient}. + * {@link #getBlobAsyncClient(String)}, and operations on the service are available on {@link BlobServiceAsyncClient}. * *

* Please refer to the Azure @@ -107,7 +107,7 @@ public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName) { public BlockBlobAsyncClient getBlockBlobAsyncClient(String blobName, String snapshot) { return new BlockBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -140,7 +140,7 @@ public PageBlobAsyncClient getPageBlobAsyncClient(String blobName) { public PageBlobAsyncClient getPageBlobAsyncClient(String blobName, String snapshot) { return new PageBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -173,7 +173,7 @@ public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName) { public AppendBlobAsyncClient getAppendBlobAsyncClient(String blobName, String snapshot) { return new AppendBlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** @@ -202,18 +202,18 @@ public BlobAsyncClient getBlobAsyncClient(String blobName) { public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) { return new BlobAsyncClient(new AzureBlobStorageBuilder() .url(Utility.appendToURLPath(getContainerUrl(), blobName).toString()) - .pipeline(azureBlobStorage.httpPipeline()), snapshot); + .pipeline(azureBlobStorage.getHttpPipeline()), snapshot); } /** - * Initializes a {@link StorageAsyncClient} object pointing to the storage account this container is in. + * Initializes a {@link BlobServiceAsyncClient} object pointing to the storage account this container is in. * - * @return A {@link StorageAsyncClient} object pointing to the specified storage account + * @return A {@link BlobServiceAsyncClient} object pointing to the specified storage account */ - public StorageAsyncClient getStorageAsyncClient() { - return new StorageAsyncClient(new AzureBlobStorageBuilder() + public BlobServiceAsyncClient getBlobServiceAsyncClient() { + return new BlobServiceAsyncClient(new AzureBlobStorageBuilder() .url(Utility.stripLastPathSegment(getContainerUrl()).toString()) - .pipeline(azureBlobStorage.httpPipeline())); + .pipeline(azureBlobStorage.getHttpPipeline())); } /** @@ -224,9 +224,9 @@ public StorageAsyncClient getStorageAsyncClient() { */ public URL getContainerUrl() { try { - return new URL(azureBlobStorage.url()); + return new URL(azureBlobStorage.getUrl()); } catch (MalformedURLException e) { - throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.url()), e); + throw new RuntimeException(String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), azureBlobStorage.getUrl()), e); } } @@ -681,7 +681,7 @@ private Flux listBlobsHierarchyHelper(String delimiter, ListBlobsOptio } else { prefixes = Flux.empty(); } - Flux result = blobs.concatWith(prefixes.map(prefix -> new BlobItem().name(prefix.name()).isPrefix(true))); + Flux result = blobs.map(item -> item.isPrefix(false)).concatWith(prefixes.map(prefix -> new BlobItem().name(prefix.name()).isPrefix(true))); if (response.value().nextMarker() != null) { // Recursively add the continuation items to the observable. @@ -1102,7 +1102,7 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType); SharedKeyCredential sharedKeyCredential = - Utility.getSharedKeyCredential(this.azureBlobStorage.httpPipeline()); + Utility.getSharedKeyCredential(this.azureBlobStorage.getHttpPipeline()); Utility.assertNotNull("sharedKeyCredential", sharedKeyCredential); @@ -1119,7 +1119,7 @@ public String generateSAS(String identifier, ContainerSASPermission permissions, */ private ServiceSASSignatureValues configureServiceSASSignatureValues(ServiceSASSignatureValues serviceSASSignatureValues, String accountName) { // Set canonical name - serviceSASSignatureValues.canonicalName(this.azureBlobStorage.url(), accountName); + serviceSASSignatureValues.canonicalName(this.azureBlobStorage.getUrl(), accountName); // Set snapshotId to null serviceSASSignatureValues.snapshotId(null); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java index 12d5844a696f..c66b9d8c2373 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClient.java @@ -26,13 +26,13 @@ /** * Client to a container. It may only be instantiated through a {@link ContainerClientBuilder} or via the method {@link - * StorageClient#getContainerClient(String)}. This class does not hold any state about a particular container but is + * BlobServiceClient#getContainerClient(String)}. This class does not hold any state about a particular container but is * instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used to * construct URLs to blobs. * *

* This client contains operations on a container. Operations on a blob are available on {@link BlobClient} through - * {@link #getBlobClient(String)}, and operations on the service are available on {@link StorageClient}. + * {@link #getBlobClient(String)}, and operations on the service are available on {@link BlobServiceClient}. * *

* Please refer to the Azure @@ -171,12 +171,12 @@ public BlobClient getBlobClient(String blobName, String snapshot) { } /** - * Initializes a {@link StorageClient} object pointing to the storage account this container is in. + * Initializes a {@link BlobServiceClient} object pointing to the storage account this container is in. * - * @return A {@link StorageClient} object pointing to the specified storage account + * @return A {@link BlobServiceClient} object pointing to the specified storage account */ - public StorageClient getStorageClient() { - return new StorageClient(containerAsyncClient.getStorageAsyncClient()); + public BlobServiceClient getBlobServiceClient() { + return new BlobServiceClient(containerAsyncClient.getBlobServiceAsyncClient()); } /** diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java index 7c9e9543ffd9..97a05be2ed25 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerClientBuilder.java @@ -6,6 +6,7 @@ import com.azure.core.credentials.TokenCredential; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -110,7 +111,7 @@ private AzureBlobStorageBuilder buildImpl() { policies.addAll(this.policies); policies.add(new HttpLoggingPolicy(logLevel)); - HttpPipeline pipeline = HttpPipeline.builder() + HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerProperties.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ContainerProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerProperties.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ContainerSASPermission.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java index e22a3fa72a16..c27ad3645d20 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadAsyncResponse.java @@ -18,7 +18,7 @@ /** * {@code DownloadAsyncResponse} wraps the protocol-layer response from {@link BlobAsyncClient#download(BlobRange, - * BlobAccessConditions, boolean, ReliableDownloadOptions)} to automatically retry failed reads from the body as + * ReliableDownloadOptions, BlobAccessConditions, boolean)} to automatically retry failed reads from the body as * appropriate. If the download is interrupted, the {@code DownloadAsyncResponse} will make a request to resume the download * from where it left off, allowing the user to consume the data as one continuous stream, for any interruptions are * hidden. The retry behavior is defined by the options passed to the {@link #body(ReliableDownloadOptions)}. The diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/DownloadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/DownloadResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/DownloadResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/HTTPGetterInfo.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/IPRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/IPRange.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/IPRange.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/IPRange.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/IProgressReceiver.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/IProgressReceiver.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/IProgressReceiver.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/IProgressReceiver.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java index 925f167b2ad9..3f5467a7a6a7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java @@ -37,7 +37,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient}, - * and operations on the service are available on {@link StorageAsyncClient}. + * and operations on the service are available on {@link BlobServiceAsyncClient}. * *

* Please refer diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobClient.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java index 14c0ea4644de..fc84f9c9ea21 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/PageBlobClient.java @@ -34,7 +34,7 @@ * *

* This client contains operations on a blob. Operations on a container are available on {@link ContainerClient}, - * and operations on the service are available on {@link StorageClient}. + * and operations on the service are available on {@link BlobServiceClient}. * *

* Please refer to the Azure Docs diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ProgressReporter.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ProgressReporter.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ProgressReporter.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ProgressReporter.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/SASProtocol.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASProtocol.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/SASProtocol.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASProtocol.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/SR.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SR.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/SR.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SR.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/ServiceSASSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ServiceSASSignatureValues.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/ServiceSASSignatureValues.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/ServiceSASSignatureValues.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/StorageException.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/StorageException.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/StorageException.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/StorageException.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/URLParser.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/URLParser.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/URLParser.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/URLParser.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/Utility.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/Utility.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/Utility.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/Utility.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java similarity index 87% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index a6f486ff075f..3439bb917017 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.AppendBlobsAppendBlockFromUrlResponse; @@ -56,28 +58,28 @@ public final class AppendBlobsImpl { * @param client the instance of the service client containing this operation class. */ public AppendBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(AppendBlobsService.class, client); + this.service = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for AppendBlobs to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageAppendBlobs + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs AppendBlob") + @ServiceInterface(name = "AzureBlobStorageAppendBlobs") private interface AppendBlobsService { - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); @@ -93,6 +95,7 @@ private interface AppendBlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -112,7 +115,7 @@ public Mono createWithRestResponseAsync(String contai String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -134,6 +137,7 @@ public Mono createWithRestResponseAsync(String contai * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "AppendBlob"; String blobContentType = null; @@ -183,7 +187,7 @@ public Mono createWithRestResponseAsync(String contai String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -197,6 +201,7 @@ public Mono createWithRestResponseAsync(String contai * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final String encryptionKey = null; @@ -212,7 +217,7 @@ public Mono appendBlockWithRestResponseAsync(Str String transactionalContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.appendBlock(containerName, blob, this.client.url(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -235,6 +240,7 @@ public Mono appendBlockWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "appendblock"; String leaseId = null; @@ -268,7 +274,7 @@ public Mono appendBlockWithRestResponseAsync(Str String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock(containerName, blob, this.client.url(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -282,6 +288,7 @@ public Mono appendBlockWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, Context context) { final String sourceRange = null; final Integer timeout = null; @@ -299,7 +306,7 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.appendBlockFromUrl(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -321,6 +328,7 @@ public Mono appendBlockFromUrlWithRestRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, AppendPositionAccessConditions appendPositionAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "appendblock"; String leaseId = null; @@ -372,6 +380,6 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrl(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.version(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, timeout, contentLength, this.client.getVersion(), requestId, comp, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java similarity index 91% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java index c77d984c4e92..95eccfcca197 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java @@ -6,10 +6,12 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.ServiceClientBuilder; /** * A builder for creating a new instance of the AzureBlobStorage type. */ +@ServiceClientBuilder(serviceClients = AzureBlobStorageImpl.class) public final class AzureBlobStorageBuilder { /* * The URL of the service account, container, or blob that is the targe of the desired operation. @@ -73,10 +75,10 @@ public AzureBlobStorageImpl build() { } AzureBlobStorageImpl client = new AzureBlobStorageImpl(pipeline); if (this.url != null) { - client.url(this.url); + client.setUrl(this.url); } if (this.version != null) { - client.version(this.version); + client.setVersion(this.version); } return client; } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java similarity index 89% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java index 6702b82da14e..5fc9bc8ae273 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java @@ -4,14 +4,13 @@ package com.azure.storage.blob.implementation; -import com.azure.core.ServiceClient; import com.azure.core.http.HttpPipeline; import com.azure.core.implementation.RestProxy; /** * Initializes a new instance of the AzureBlobStorage type. */ -public final class AzureBlobStorageImpl extends ServiceClient { +public final class AzureBlobStorageImpl { /** * The URL of the service account, container, or blob that is the targe of the desired operation. */ @@ -22,7 +21,7 @@ public final class AzureBlobStorageImpl extends ServiceClient { * * @return the url value. */ - public String url() { + public String getUrl() { return this.url; } @@ -30,11 +29,9 @@ public String url() { * Sets The URL of the service account, container, or blob that is the targe of the desired operation. * * @param url the url value. - * @return the service client itself. */ - AzureBlobStorageImpl url(String url) { + void setUrl(String url) { this.url = url; - return this; } /** @@ -47,7 +44,7 @@ AzureBlobStorageImpl url(String url) { * * @return the version value. */ - public String version() { + public String getVersion() { return this.version; } @@ -55,11 +52,23 @@ public String version() { * Sets Specifies the version of the operation to use for this request. * * @param version the version value. - * @return the service client itself. */ - AzureBlobStorageImpl version(String version) { + void setVersion(String version) { this.version = version; - return this; + } + + /** + * The HTTP pipeline to send requests through. + */ + private HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; } /** @@ -159,7 +168,7 @@ public AzureBlobStorageImpl() { * @param httpPipeline The HTTP pipeline to send requests through. */ public AzureBlobStorageImpl(HttpPipeline httpPipeline) { - super(httpPipeline); + this.httpPipeline = httpPipeline; this.services = new ServicesImpl(this); this.containers = new ContainersImpl(this); this.blobs = new BlobsImpl(this); diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java similarity index 87% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index e89e8972aed3..eba1efa297e4 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -4,20 +4,22 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.DELETE; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HEAD; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.Delete; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.Head; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.AccessTier; @@ -71,98 +73,98 @@ public final class BlobsImpl { * @param client the instance of the service client containing this operation class. */ public BlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(BlobsService.class, client); + this.service = RestProxy.create(BlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for Blobs to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageBlobs to be + * used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs") + @ServiceInterface(name = "AzureBlobStorageBlobs") private interface BlobsService { - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @HEAD("{containerName}/{blob}") + @Head("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @DELETE("{containerName}/{blob}") + @Delete("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono undelete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono abortCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -177,6 +179,7 @@ private interface BlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -192,7 +195,7 @@ public Mono downloadWithRestResponseAsync(String containe final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.download(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -215,6 +218,7 @@ public Mono downloadWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, Boolean rangeGetContentMD5, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -238,7 +242,7 @@ public Mono downloadWithRestResponseAsync(String containe } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.download(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, rangeGetContentMD5, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -250,6 +254,7 @@ public Mono downloadWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -263,7 +268,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getProperties(containerName, blob, this.client.url(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -284,6 +289,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -307,11 +313,11 @@ public Mono getPropertiesWithRestResponseAsync(Strin } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getProperties(containerName, blob, this.client.url(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the storage service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. * * @param containerName The container name. * @param blob The blob name. @@ -319,6 +325,7 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -330,11 +337,11 @@ public Mono deleteWithRestResponseAsync(String containerNam final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, blob, this.client.url(), snapshot, versionId, timeout, deleteSnapshots, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the storage service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC permissions. * * @param containerName The container name. * @param blob The blob name. @@ -349,6 +356,7 @@ public Mono deleteWithRestResponseAsync(String containerNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, DeleteSnapshotsOptionType deleteSnapshots, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { String leaseId = null; if (leaseAccessConditions != null) { @@ -372,7 +380,7 @@ public Mono deleteWithRestResponseAsync(String containerNam } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, blob, this.client.url(), snapshot, versionId, timeout, deleteSnapshots, this.client.version(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, deleteSnapshots, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -384,11 +392,12 @@ public Mono deleteWithRestResponseAsync(String containerNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono undeleteWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "undelete"; - return service.undelete(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, context); + return service.undelete(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -402,9 +411,10 @@ public Mono undeleteWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono undeleteWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, Context context) { final String comp = "undelete"; - return service.undelete(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, context); + return service.undelete(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -416,6 +426,7 @@ public Mono undeleteWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; @@ -431,7 +442,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setHTTPHeaders(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -448,6 +459,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String blobCacheControl = null; @@ -497,7 +509,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHTTPHeaders(containerName, blob, this.client.url(), timeout, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentMD5Converted, blobContentEncoding, blobContentLanguage, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -509,6 +521,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; @@ -522,7 +535,7 @@ public Mono setMetadataWithRestResponseAsync(String co final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setMetadata(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -542,6 +555,7 @@ public Mono setMetadataWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "metadata"; String leaseId = null; @@ -566,7 +580,7 @@ public Mono setMetadataWithRestResponseAsync(String co } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadata(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -578,6 +592,7 @@ public Mono setMetadataWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Integer duration = null; @@ -589,7 +604,7 @@ public Mono acquireLeaseWithRestResponseAsync(String final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, blob, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -606,6 +621,7 @@ public Mono acquireLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "acquire"; @@ -627,7 +643,7 @@ public Mono acquireLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, blob, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -640,6 +656,7 @@ public Mono acquireLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -649,7 +666,7 @@ public Mono releaseLeaseWithRestResponseAsync(String final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -665,6 +682,7 @@ public Mono releaseLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "release"; @@ -686,7 +704,7 @@ public Mono releaseLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -699,6 +717,7 @@ public Mono releaseLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -708,7 +727,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -724,6 +743,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "renew"; @@ -745,7 +765,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, blob, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -759,6 +779,7 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -768,7 +789,7 @@ public Mono changeLeaseWithRestResponseAsync(String co final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, blob, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -785,6 +806,7 @@ public Mono changeLeaseWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "change"; @@ -806,7 +828,7 @@ public Mono changeLeaseWithRestResponseAsync(String co } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, blob, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -818,6 +840,7 @@ public Mono changeLeaseWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Integer breakPeriod = null; @@ -828,7 +851,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, blob, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -844,6 +867,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String action = "break"; @@ -865,7 +889,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, blob, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -877,6 +901,7 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final Map metadata = null; @@ -890,7 +915,7 @@ public Mono createSnapshotWithRestResponseAsync(Str final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.createSnapshot(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -910,6 +935,7 @@ public Mono createSnapshotWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "snapshot"; OffsetDateTime ifModifiedSince = null; @@ -934,7 +960,7 @@ public Mono createSnapshotWithRestResponseAsync(Str } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshot(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -947,6 +973,7 @@ public Mono createSnapshotWithRestResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final Map metadata = null; @@ -960,7 +987,7 @@ public Mono startCopyFromURLWithRestResponseAsync DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.startCopyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -979,6 +1006,7 @@ public Mono startCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { OffsetDateTime sourceIfModifiedSince = null; if (sourceModifiedAccessConditions != null) { @@ -1020,7 +1048,7 @@ public Mono startCopyFromURLWithRestResponseAsync DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.startCopyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1033,6 +1061,7 @@ public Mono startCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final Map metadata = null; @@ -1047,7 +1076,7 @@ public Mono copyFromURLWithRestResponseAsync(String co DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.copyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1066,6 +1095,7 @@ public Mono copyFromURLWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, String requestId, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, LeaseAccessConditions leaseAccessConditions, Context context) { final String xMsRequiresSync = "true"; OffsetDateTime sourceIfModifiedSince = null; @@ -1108,7 +1138,7 @@ public Mono copyFromURLWithRestResponseAsync(String co DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyFromURL(containerName, blob, this.client.url(), timeout, metadata, copySource, this.client.version(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, copySource, this.client.getVersion(), requestId, xMsRequiresSync, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, context); } /** @@ -1121,13 +1151,14 @@ public Mono copyFromURLWithRestResponseAsync(String co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String leaseId = null; - return service.abortCopyFromURL(containerName, blob, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); } /** @@ -1143,6 +1174,7 @@ public Mono abortCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyFromURLWithRestResponseAsync(String containerName, String blob, String copyId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; @@ -1150,7 +1182,7 @@ public Mono abortCopyFromURLWithRestResponseAsync if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.abortCopyFromURL(containerName, blob, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId, context); + return service.abortCopyFromURL(containerName, blob, this.client.getUrl(), copyId, timeout, this.client.getVersion(), requestId, comp, copyActionAbortConstant, leaseId, context); } /** @@ -1163,12 +1195,13 @@ public Mono abortCopyFromURLWithRestResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Context context) { final Integer timeout = null; final String requestId = null; final String comp = "tier"; final String leaseId = null; - return service.setTier(containerName, blob, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId, context); + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -1184,13 +1217,14 @@ public Mono setTierWithRestResponseAsync(String containerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "tier"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.setTier(containerName, blob, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId, context); + return service.setTier(containerName, blob, this.client.getUrl(), timeout, tier, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -1202,9 +1236,10 @@ public Mono setTierWithRestResponseAsync(String containerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccountInfoWithRestResponseAsync(String containerName, String blob, Context context) { final String restype = "account"; final String comp = "properties"; - return service.getAccountInfo(containerName, blob, this.client.url(), this.client.version(), restype, comp, context); + return service.getAccountInfo(containerName, blob, this.client.getUrl(), this.client.getVersion(), restype, comp, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java similarity index 88% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 2c4645d2bd4b..390c2436de9a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -4,19 +4,21 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobHTTPHeaders; @@ -33,12 +35,11 @@ import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageErrorException; import io.netty.buffer.ByteBuf; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -61,38 +62,38 @@ public final class BlockBlobsImpl { * @param client the instance of the service client containing this operation class. */ public BlockBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(BlockBlobsService.class, client); + this.service = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for BlockBlobs to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageBlockBlobs + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs BlockBlob") + @ServiceInterface(name = "AzureBlobStorageBlockBlobs") private interface BlockBlobsService { - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono stageBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono stageBlockFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @QueryParam("timeout") Integer timeout, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); @@ -109,6 +110,7 @@ private interface BlockBlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -128,7 +130,7 @@ public Mono uploadWithRestResponseAsync(String contain String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.upload(containerName, blob, this.client.url(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -151,6 +153,7 @@ public Mono uploadWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "BlockBlob"; String blobContentType = null; @@ -200,7 +203,7 @@ public Mono uploadWithRestResponseAsync(String contain String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.upload(containerName, blob, this.client.url(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -215,6 +218,7 @@ public Mono uploadWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, Context context) { final Integer timeout = null; final String encryptionKey = null; @@ -224,7 +228,7 @@ public Mono stageBlockWithRestResponseAsync(String final String comp = "block"; final String leaseId = null; String transactionalContentMD5Converted = null; - return service.stageBlock(containerName, blob, this.client.url(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -246,6 +250,7 @@ public Mono stageBlockWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "block"; String leaseId = null; @@ -253,7 +258,7 @@ public Mono stageBlockWithRestResponseAsync(String leaseId = leaseAccessConditions.leaseId(); } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - return service.stageBlock(containerName, blob, this.client.url(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, context); + return service.stageBlock(containerName, blob, this.client.getUrl(), blockId, contentLength, transactionalContentMD5Converted, body, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -268,6 +273,7 @@ public Mono stageBlockWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, Context context) { final String sourceRange = null; final Integer timeout = null; @@ -282,7 +288,7 @@ public Mono stageBlockFromURLWithRestRespon String sourceContentMD5Converted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.stageBlockFromURL(containerName, blob, this.client.url(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -306,6 +312,7 @@ public Mono stageBlockFromURLWithRestRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono stageBlockFromURLWithRestResponseAsync(String containerName, String blob, String blockId, long contentLength, URL sourceUrl, String sourceRange, byte[] sourceContentMD5, Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "block"; String leaseId = null; @@ -331,7 +338,7 @@ public Mono stageBlockFromURLWithRestRespon String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURL(containerName, blob, this.client.url(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.stageBlockFromURL(containerName, blob, this.client.getUrl(), blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -344,6 +351,7 @@ public Mono stageBlockFromURLWithRestRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Context context) { final Integer timeout = null; final Map metadata = null; @@ -363,7 +371,7 @@ public Mono commitBlockListWithRestResponseAs String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.commitBlockList(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -385,6 +393,7 @@ public Mono commitBlockListWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "blocklist"; String blobCacheControl = null; @@ -434,7 +443,7 @@ public Mono commitBlockListWithRestResponseAs String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.commitBlockList(containerName, blob, this.client.url(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.version(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blocks, this.client.getVersion(), requestId, comp, blobCacheControl, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -447,6 +456,7 @@ public Mono commitBlockListWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, Context context) { final String snapshot = null; final String versionId = null; @@ -454,7 +464,7 @@ public Mono getBlockListWithRestResponseAsync(St final String requestId = null; final String comp = "blocklist"; final String leaseId = null; - return service.getBlockList(containerName, blob, this.client.url(), snapshot, versionId, listType, timeout, this.client.version(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, versionId, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); } /** @@ -472,12 +482,13 @@ public Mono getBlockListWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, String versionId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String comp = "blocklist"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getBlockList(containerName, blob, this.client.url(), snapshot, versionId, listType, timeout, this.client.version(), requestId, comp, leaseId, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, versionId, listType, timeout, this.client.getVersion(), requestId, comp, leaseId, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java similarity index 86% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 780b3a356a61..598e19f68192 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -4,21 +4,23 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.DELETE; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.CollectionFormat; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.Delete; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.serializer.jackson.JacksonAdapter; import com.azure.core.util.Context; import com.azure.storage.blob.models.ContainersAcquireLeaseResponse; @@ -41,11 +43,10 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.SignedIdentifier; import com.azure.storage.blob.models.StorageErrorException; -import reactor.core.publisher.Mono; - import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -68,83 +69,83 @@ public final class ContainersImpl { * @param client the instance of the service client containing this operation class. */ public ContainersImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(ContainersService.class, client); + this.service = RestProxy.create(ContainersService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for Containers to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageContainers + * to be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs Containers") + @ServiceInterface(name = "AzureBlobStorageContainers") private interface ContainersService { - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @DELETE("{containerName}") + @Delete("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono delete(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setMetadata(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) - Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); + Mono setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifierWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono acquireLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono releaseLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono renewLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono breakLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @PUT("{containerName}") + @Put("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono changeLease(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listBlobFlatSegment(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listBlobHierarchySegment(@PathParam("containerName") String containerName, @HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("{containerName}") + @Get("{containerName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@PathParam("containerName") String containerName, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -158,13 +159,14 @@ private interface ContainersService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Map metadata = null; final PublicAccessType access = null; final String requestId = null; final String restype = "container"; - return service.create(containerName, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype, context); + return service.create(containerName, this.client.getUrl(), timeout, metadata, access, this.client.getVersion(), requestId, restype, context); } /** @@ -179,9 +181,10 @@ public Mono createWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, Integer timeout, Map metadata, PublicAccessType access, String requestId, Context context) { final String restype = "container"; - return service.create(containerName, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype, context); + return service.create(containerName, this.client.getUrl(), timeout, metadata, access, this.client.getVersion(), requestId, restype, context); } /** @@ -192,12 +195,13 @@ public Mono createWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "container"; final String leaseId = null; - return service.getProperties(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); } /** @@ -211,13 +215,14 @@ public Mono getPropertiesWithRestResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String restype = "container"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getProperties(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, context); + return service.getProperties(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, context); } /** @@ -228,6 +233,7 @@ public Mono getPropertiesWithRestResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; @@ -235,7 +241,7 @@ public Mono deleteWithRestResponseAsync(String contain final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -250,6 +256,7 @@ public Mono deleteWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; String leaseId = null; @@ -266,7 +273,7 @@ public Mono deleteWithRestResponseAsync(String contain } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.delete(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -277,6 +284,7 @@ public Mono deleteWithRestResponseAsync(String contain * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Map metadata = null; @@ -285,7 +293,7 @@ public Mono setMetadataWithRestResponseAsync(Stri final String comp = "metadata"; final String leaseId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; - return service.setMetadata(containerName, this.client.url(), timeout, metadata, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); } /** @@ -301,6 +309,7 @@ public Mono setMetadataWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithRestResponseAsync(String containerName, Integer timeout, Map metadata, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; final String comp = "metadata"; @@ -313,7 +322,7 @@ public Mono setMetadataWithRestResponseAsync(Stri ifModifiedSince = modifiedAccessConditions.ifModifiedSince(); } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadata(containerName, this.client.url(), timeout, metadata, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); + return service.setMetadata(containerName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, context); } /** @@ -324,13 +333,14 @@ public Mono setMetadataWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "container"; final String comp = "acl"; final String leaseId = null; - return service.getAccessPolicy(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); } /** @@ -344,6 +354,7 @@ public Mono getAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithRestResponseAsync(String containerName, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, Context context) { final String restype = "container"; final String comp = "acl"; @@ -351,7 +362,7 @@ public Mono getAccessPolicyWithRestResponseAs if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } - return service.getAccessPolicy(containerName, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId, context); + return service.getAccessPolicy(containerName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, leaseId, context); } /** @@ -362,6 +373,7 @@ public Mono getAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final PublicAccessType access = null; @@ -369,10 +381,10 @@ public Mono setAccessPolicyWithRestResponseAs final String restype = "container"; final String comp = "acl"; final String leaseId = null; - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(null); + SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(null); DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setAccessPolicy(containerName, this.client.url(), containerAclConverted, timeout, access, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -389,6 +401,7 @@ public Mono setAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithRestResponseAsync(String containerName, List containerAcl, Integer timeout, PublicAccessType access, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String restype = "container"; final String comp = "acl"; @@ -404,10 +417,10 @@ public Mono setAccessPolicyWithRestResponseAs if (modifiedAccessConditions != null) { ifUnmodifiedSince = modifiedAccessConditions.ifUnmodifiedSince(); } - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); + SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(containerAcl); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setAccessPolicy(containerName, this.client.url(), containerAclConverted, timeout, access, this.client.version(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -418,6 +431,7 @@ public Mono setAccessPolicyWithRestResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Integer duration = null; @@ -428,7 +442,7 @@ public Mono acquireLeaseWithRestResponseAsync(St final String action = "acquire"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -444,6 +458,7 @@ public Mono acquireLeaseWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -458,7 +473,7 @@ public Mono acquireLeaseWithRestResponseAsync(St } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, this.client.url(), timeout, duration, proposedLeaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.acquireLease(containerName, this.client.getUrl(), timeout, duration, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -470,6 +485,7 @@ public Mono acquireLeaseWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -478,7 +494,7 @@ public Mono releaseLeaseWithRestResponseAsync(St final String action = "release"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -493,6 +509,7 @@ public Mono releaseLeaseWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -507,7 +524,7 @@ public Mono releaseLeaseWithRestResponseAsync(St } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.releaseLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -519,6 +536,7 @@ public Mono releaseLeaseWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String leaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -527,7 +545,7 @@ public Mono renewLeaseWithRestResponseAsync(String final String action = "renew"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -542,6 +560,7 @@ public Mono renewLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithRestResponseAsync(String containerName, String leaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -556,7 +575,7 @@ public Mono renewLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, this.client.url(), timeout, leaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.renewLease(containerName, this.client.getUrl(), timeout, leaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -567,6 +586,7 @@ public Mono renewLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, Context context) { final Integer timeout = null; final Integer breakPeriod = null; @@ -576,7 +596,7 @@ public Mono breakLeaseWithRestResponseAsync(String final String action = "break"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -591,6 +611,7 @@ public Mono breakLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithRestResponseAsync(String containerName, Integer timeout, Integer breakPeriod, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -605,7 +626,7 @@ public Mono breakLeaseWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, this.client.url(), timeout, breakPeriod, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.breakLease(containerName, this.client.getUrl(), timeout, breakPeriod, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -618,6 +639,7 @@ public Mono breakLeaseWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Context context) { final Integer timeout = null; final String requestId = null; @@ -626,7 +648,7 @@ public Mono changeLeaseWithRestResponseAsync(Stri final String action = "change"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -642,6 +664,7 @@ public Mono changeLeaseWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithRestResponseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "lease"; final String restype = "container"; @@ -656,7 +679,7 @@ public Mono changeLeaseWithRestResponseAsync(Stri } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, this.client.url(), timeout, leaseId, proposedLeaseId, this.client.version(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); + return service.changeLease(containerName, this.client.getUrl(), timeout, leaseId, proposedLeaseId, this.client.getVersion(), requestId, comp, restype, action, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context); } /** @@ -667,6 +690,7 @@ public Mono changeLeaseWithRestResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobFlatSegmentWithRestResponseAsync(String containerName, Context context) { final String prefix = null; final String marker = null; @@ -676,7 +700,7 @@ public Mono listBlobFlatSegmentWithRestRe final String restype = "container"; final String comp = "list"; String includeConverted = null; - return service.listBlobFlatSegment(containerName, this.client.url(), prefix, marker, maxresults, includeConverted, timeout, this.client.version(), requestId, restype, comp, context); + return service.listBlobFlatSegment(containerName, this.client.getUrl(), prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -693,11 +717,12 @@ public Mono listBlobFlatSegmentWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobFlatSegmentWithRestResponseAsync(String containerName, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; String includeConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); - return service.listBlobFlatSegment(containerName, this.client.url(), prefix, marker, maxresults, includeConverted, timeout, this.client.version(), requestId, restype, comp, context); + return service.listBlobFlatSegment(containerName, this.client.getUrl(), prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -709,6 +734,7 @@ public Mono listBlobFlatSegmentWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobHierarchySegmentWithRestResponseAsync(String containerName, String delimiter, Context context) { final String prefix = null; final String marker = null; @@ -718,7 +744,7 @@ public Mono listBlobHierarchySegment final String restype = "container"; final String comp = "list"; String includeConverted = null; - return service.listBlobHierarchySegment(containerName, this.client.url(), prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.version(), requestId, restype, comp, context); + return service.listBlobHierarchySegment(containerName, this.client.getUrl(), prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -736,11 +762,12 @@ public Mono listBlobHierarchySegment * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listBlobHierarchySegmentWithRestResponseAsync(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; String includeConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); - return service.listBlobHierarchySegment(containerName, this.client.url(), prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.version(), requestId, restype, comp, context); + return service.listBlobHierarchySegment(containerName, this.client.getUrl(), prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -751,9 +778,10 @@ public Mono listBlobHierarchySegment * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccountInfoWithRestResponseAsync(String containerName, Context context) { final String restype = "account"; final String comp = "properties"; - return service.getAccountInfo(containerName, this.client.url(), this.client.version(), restype, comp, context); + return service.getAccountInfo(containerName, this.client.getUrl(), this.client.getVersion(), restype, comp, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ListBlobsIncludeItemWrapper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ListBlobsIncludeItemWrapper.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ListBlobsIncludeItemWrapper.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ListBlobsIncludeItemWrapper.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java similarity index 89% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index f6f6d23380cd..97dd44b22bc5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -4,19 +4,21 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.PathParam; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.DateTimeRfc1123; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.PathParam; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.implementation.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.models.BlobHTTPHeaders; @@ -37,12 +39,11 @@ import com.azure.storage.blob.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.StorageErrorException; import io.netty.buffer.ByteBuf; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - import java.net.URL; import java.time.OffsetDateTime; import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An instance of this class provides access to all the operations defined in @@ -65,58 +66,58 @@ public final class PageBlobsImpl { * @param client the instance of the service client containing this operation class. */ public PageBlobsImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(PageBlobsService.class, client); + this.service = RestProxy.create(PageBlobsService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for PageBlobs to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStoragePageBlobs to + * be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs PageBlobs") + @ServiceInterface(name = "AzureBlobStoragePageBlobs") private interface PageBlobsService { - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @QueryParam("x-ms-encryption-key") String encryptionKey, @QueryParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @QueryParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono clearPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono uploadPagesFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getPageRanges(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @GET("{containerName}/{blob}") + @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getPageRangesDiff(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono resize(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono updateSequenceNumber(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-sequence-number-action") SequenceNumberActionType sequenceNumberAction, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @PUT("{containerName}/{blob}") + @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono copyIncremental(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @@ -133,6 +134,7 @@ private interface PageBlobsService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Context context) { final Integer timeout = null; final Map metadata = null; @@ -153,7 +155,7 @@ public Mono createWithRestResponseAsync(String containe String blobContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blobContentLength, blobSequenceNumber, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -177,6 +179,7 @@ public Mono createWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, Map metadata, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, Long blobSequenceNumber, String requestId, BlobHTTPHeaders blobHTTPHeaders, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String blobType = "PageBlob"; String blobContentType = null; @@ -226,7 +229,7 @@ public Mono createWithRestResponseAsync(String containe String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.create(containerName, blob, this.client.url(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blobContentLength, blobSequenceNumber, this.client.version(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobType, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, blobContentDisposition, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -240,6 +243,7 @@ public Mono createWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Context context) { final Integer timeout = null; final String range = null; @@ -258,7 +262,7 @@ public Mono uploadPagesWithRestResponseAsync(Strin String transactionalContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.uploadPages(containerName, blob, this.client.url(), body, contentLength, transactionalContentMD5Converted, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -282,6 +286,7 @@ public Mono uploadPagesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, Integer timeout, String range, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "update"; @@ -320,7 +325,7 @@ public Mono uploadPagesWithRestResponseAsync(Strin String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPages(containerName, blob, this.client.url(), body, contentLength, transactionalContentMD5Converted, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -333,6 +338,7 @@ public Mono uploadPagesWithRestResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Context context) { final Integer timeout = null; final String range = null; @@ -347,7 +353,7 @@ public Mono clearPagesWithRestResponseAsync(String final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.clearPages(containerName, blob, this.client.url(), contentLength, timeout, range, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -366,6 +372,7 @@ public Mono clearPagesWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono clearPagesWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "clear"; @@ -403,7 +410,7 @@ public Mono clearPagesWithRestResponseAsync(String } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPages(containerName, blob, this.client.url(), contentLength, timeout, range, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.clearPages(containerName, blob, this.client.getUrl(), contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -419,6 +426,7 @@ public Mono clearPagesWithRestResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, Context context) { final Integer timeout = null; final String requestId = null; @@ -437,7 +445,7 @@ public Mono uploadPagesFromURLWithRestRespo DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.uploadPagesFromURL(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, contentLength, timeout, range, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -460,6 +468,7 @@ public Mono uploadPagesFromURLWithRestRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, SequenceNumberAccessConditions sequenceNumberAccessConditions, ModifiedAccessConditions modifiedAccessConditions, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "page"; final String pageWrite = "update"; @@ -516,7 +525,7 @@ public Mono uploadPagesFromURLWithRestRespo DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURL(containerName, blob, this.client.url(), sourceUrl, sourceRange, sourceContentMD5Converted, contentLength, timeout, range, this.client.version(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, contentLength, timeout, range, this.client.getVersion(), requestId, comp, pageWrite, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, context); } /** @@ -528,6 +537,7 @@ public Mono uploadPagesFromURLWithRestRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -540,7 +550,7 @@ public Mono getPageRangesWithRestResponseAsync(S final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRanges(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -559,6 +569,7 @@ public Mono getPageRangesWithRestResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "pagelist"; String leaseId = null; @@ -583,7 +594,7 @@ public Mono getPageRangesWithRestResponseAsync(S } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRanges(containerName, blob, this.client.url(), snapshot, versionId, timeout, range, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -595,6 +606,7 @@ public Mono getPageRangesWithRestResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, Context context) { final String snapshot = null; final String versionId = null; @@ -608,7 +620,7 @@ public Mono getPageRangesDiffWithRestRespons final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRangesDiff(containerName, blob, this.client.url(), snapshot, versionId, timeout, prevsnapshot, range, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, prevsnapshot, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -628,6 +640,7 @@ public Mono getPageRangesDiffWithRestRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String prevsnapshot, String range, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "pagelist"; String leaseId = null; @@ -652,7 +665,7 @@ public Mono getPageRangesDiffWithRestRespons } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiff(containerName, blob, this.client.url(), snapshot, versionId, timeout, prevsnapshot, range, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, prevsnapshot, range, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -665,6 +678,7 @@ public Mono getPageRangesDiffWithRestRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Context context) { final Integer timeout = null; final String requestId = null; @@ -674,7 +688,7 @@ public Mono resizeWithRestResponseAsync(String containe final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.resize(containerName, blob, this.client.url(), timeout, blobContentLength, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.resize(containerName, blob, this.client.getUrl(), timeout, blobContentLength, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -691,6 +705,7 @@ public Mono resizeWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono resizeWithRestResponseAsync(String containerName, String blob, long blobContentLength, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String leaseId = null; @@ -715,7 +730,7 @@ public Mono resizeWithRestResponseAsync(String containe } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resize(containerName, blob, this.client.url(), timeout, blobContentLength, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.resize(containerName, blob, this.client.getUrl(), timeout, blobContentLength, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -728,6 +743,7 @@ public Mono resizeWithRestResponseAsync(String containe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Context context) { final Integer timeout = null; final Long blobSequenceNumber = 0L; @@ -738,7 +754,7 @@ public Mono updateSequenceNumberWithRestR final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.updateSequenceNumber(containerName, blob, this.client.url(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -756,6 +772,7 @@ public Mono updateSequenceNumberWithRestR * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateSequenceNumberWithRestResponseAsync(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, Long blobSequenceNumber, String requestId, LeaseAccessConditions leaseAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "properties"; String leaseId = null; @@ -780,7 +797,7 @@ public Mono updateSequenceNumberWithRestR } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumber(containerName, blob, this.client.url(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.version(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.updateSequenceNumber(containerName, blob, this.client.getUrl(), timeout, sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -793,6 +810,7 @@ public Mono updateSequenceNumberWithRestR * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Context context) { final Integer timeout = null; final String requestId = null; @@ -801,7 +819,7 @@ public Mono copyIncrementalWithRestResponseAsy final String ifNoneMatch = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.copyIncremental(containerName, blob, this.client.url(), timeout, copySource, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, copySource, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } /** @@ -817,6 +835,7 @@ public Mono copyIncrementalWithRestResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyIncrementalWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { final String comp = "incrementalcopy"; OffsetDateTime ifModifiedSince = null; @@ -837,6 +856,6 @@ public Mono copyIncrementalWithRestResponseAsy } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncremental(containerName, blob, this.client.url(), timeout, copySource, this.client.version(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); + return service.copyIncremental(containerName, blob, this.client.getUrl(), timeout, copySource, this.client.getVersion(), requestId, comp, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java similarity index 82% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index a31982006724..5d77ec9bcee0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -4,18 +4,20 @@ package com.azure.storage.blob.implementation; -import com.azure.core.annotations.BodyParam; -import com.azure.core.annotations.ExpectedResponses; -import com.azure.core.annotations.GET; -import com.azure.core.annotations.HeaderParam; -import com.azure.core.annotations.Host; -import com.azure.core.annotations.HostParam; -import com.azure.core.annotations.POST; -import com.azure.core.annotations.PUT; -import com.azure.core.annotations.QueryParam; -import com.azure.core.annotations.Service; -import com.azure.core.annotations.UnexpectedResponseExceptionType; import com.azure.core.implementation.RestProxy; +import com.azure.core.implementation.annotation.BodyParam; +import com.azure.core.implementation.annotation.ExpectedResponses; +import com.azure.core.implementation.annotation.Get; +import com.azure.core.implementation.annotation.HeaderParam; +import com.azure.core.implementation.annotation.Host; +import com.azure.core.implementation.annotation.HostParam; +import com.azure.core.implementation.annotation.Post; +import com.azure.core.implementation.annotation.Put; +import com.azure.core.implementation.annotation.QueryParam; +import com.azure.core.implementation.annotation.ReturnType; +import com.azure.core.implementation.annotation.ServiceInterface; +import com.azure.core.implementation.annotation.ServiceMethod; +import com.azure.core.implementation.annotation.UnexpectedResponseExceptionType; import com.azure.core.util.Context; import com.azure.storage.blob.models.KeyInfo; import com.azure.storage.blob.models.ListContainersIncludeType; @@ -50,43 +52,43 @@ public final class ServicesImpl { * @param client the instance of the service client containing this operation class. */ public ServicesImpl(AzureBlobStorageImpl client) { - this.service = RestProxy.create(ServicesService.class, client); + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); this.client = client; } /** - * The interface defining all the services for Services to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureBlobStorageServices to + * be used by the proxy service to perform REST calls. */ @Host("{url}") - @Service("Storage Blobs Service") + @ServiceInterface(name = "AzureBlobStorageServices") private interface ServicesService { - @PUT("") + @Put("") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono setProperties(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") StorageServiceProperties storageServiceProperties, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getProperties(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getStatistics(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono listContainersSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") ListContainersIncludeType include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); - @POST("") + @Post("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getUserDelegationKey(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") KeyInfo keyInfo, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); - @GET("") + @Get("") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(StorageErrorException.class) Mono getAccountInfo(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); @@ -100,12 +102,13 @@ private interface ServicesService { * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "service"; final String comp = "properties"; - return service.setProperties(this.client.url(), storageServiceProperties, timeout, this.client.version(), requestId, restype, comp, context); + return service.setProperties(this.client.getUrl(), storageServiceProperties, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -118,10 +121,11 @@ public Mono setPropertiesWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithRestResponseAsync(StorageServiceProperties storageServiceProperties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; - return service.setProperties(this.client.url(), storageServiceProperties, timeout, this.client.version(), requestId, restype, comp, context); + return service.setProperties(this.client.getUrl(), storageServiceProperties, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -131,12 +135,13 @@ public Mono setPropertiesWithRestResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; final String restype = "service"; final String comp = "properties"; - return service.getProperties(this.client.url(), timeout, this.client.version(), requestId, restype, comp, context); + return service.getProperties(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -148,10 +153,11 @@ public Mono getPropertiesWithRestResponseAsync(Co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; - return service.getProperties(this.client.url(), timeout, this.client.version(), requestId, restype, comp, context); + return service.getProperties(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -161,12 +167,13 @@ public Mono getPropertiesWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithRestResponseAsync(Context context) { final Integer timeout = null; final String requestId = null; final String restype = "service"; final String comp = "stats"; - return service.getStatistics(this.client.url(), timeout, this.client.version(), requestId, restype, comp, context); + return service.getStatistics(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -178,10 +185,11 @@ public Mono getStatisticsWithRestResponseAsync(Co * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithRestResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "stats"; - return service.getStatistics(this.client.url(), timeout, this.client.version(), requestId, restype, comp, context); + return service.getStatistics(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -191,6 +199,7 @@ public Mono getStatisticsWithRestResponseAsync(In * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listContainersSegmentWithRestResponseAsync(Context context) { final String prefix = null; final String marker = null; @@ -199,7 +208,7 @@ public Mono listContainersSegmentWithRest final Integer timeout = null; final String requestId = null; final String comp = "list"; - return service.listContainersSegment(this.client.url(), prefix, marker, maxresults, include, timeout, this.client.version(), requestId, comp, context); + return service.listContainersSegment(this.client.getUrl(), prefix, marker, maxresults, include, timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -215,9 +224,10 @@ public Mono listContainersSegmentWithRest * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono listContainersSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, ListContainersIncludeType include, Integer timeout, String requestId, Context context) { final String comp = "list"; - return service.listContainersSegment(this.client.url(), prefix, marker, maxresults, include, timeout, this.client.version(), requestId, comp, context); + return service.listContainersSegment(this.client.getUrl(), prefix, marker, maxresults, include, timeout, this.client.getVersion(), requestId, comp, context); } /** @@ -228,12 +238,13 @@ public Mono listContainersSegmentWithRest * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getUserDelegationKeyWithRestResponseAsync(KeyInfo keyInfo, Context context) { final Integer timeout = null; final String requestId = null; final String restype = "service"; final String comp = "userdelegationkey"; - return service.getUserDelegationKey(this.client.url(), keyInfo, timeout, this.client.version(), requestId, restype, comp, context); + return service.getUserDelegationKey(this.client.getUrl(), keyInfo, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -246,10 +257,11 @@ public Mono getUserDelegationKeyWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getUserDelegationKeyWithRestResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "userdelegationkey"; - return service.getUserDelegationKey(this.client.url(), keyInfo, timeout, this.client.version(), requestId, restype, comp, context); + return service.getUserDelegationKey(this.client.getUrl(), keyInfo, timeout, this.client.getVersion(), requestId, restype, comp, context); } /** @@ -259,9 +271,10 @@ public Mono getUserDelegationKeyWithRestRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ + @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccountInfoWithRestResponseAsync(Context context) { final String restype = "account"; final String comp = "properties"; - return service.getAccountInfo(this.client.url(), this.client.version(), restype, comp, context); + return service.getAccountInfo(this.client.getUrl(), this.client.getVersion(), restype, comp, context); } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifierWrapper.java similarity index 71% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifierWrapper.java index 41bac045975b..69a4eb5ed6c5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifierWrapper.java @@ -15,18 +15,18 @@ * A wrapper around List<SignedIdentifier> which provides top-level metadata for serialization. */ @JacksonXmlRootElement(localName = "SignedIdentifiers") -public final class SignedIdentifiersWrapper { +public final class SignedIdentifierWrapper { @JacksonXmlProperty(localName = "SignedIdentifier") - private final List signedIdentifiers; + private final List signedIdentifier; /** - * Creates an instance of SignedIdentifiersWrapper. + * Creates an instance of SignedIdentifierWrapper. * - * @param signedIdentifiers the list. + * @param signedIdentifier the list. */ @JsonCreator - public SignedIdentifiersWrapper(@JsonProperty("SignedIdentifiers") List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; + public SignedIdentifierWrapper(@JsonProperty("SignedIdentifier") List signedIdentifier) { + this.signedIdentifier = signedIdentifier; } /** @@ -35,6 +35,6 @@ public SignedIdentifiersWrapper(@JsonProperty("SignedIdentifiers") List items() { - return signedIdentifiers; + return signedIdentifier; } } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java similarity index 77% rename from storage/client/blob/src/main/java/com/azure/storage/blob/implementation/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java index 5f341b8ad1be..dcf10679cc97 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/implementation/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the implementations and inner classes for + * Package containing the implementations and inner classes for * AzureBlobStorage. */ package com.azure.storage.blob.implementation; diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java index 8b33f24bf571..04ded069ff53 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * An Access policy. */ @JacksonXmlRootElement(localName = "AccessPolicy") +@Fluent public final class AccessPolicy { /* * the date-time the policy is active diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AccessTier.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AccountKind.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAccessConditions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java index 8273338cb667..8dcea49cd76c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockFromUrlHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for AppendBlockFromUrl operation. */ @JacksonXmlRootElement(localName = "AppendBlob-AppendBlockFromUrl-Headers") +@Fluent public final class AppendBlobAppendBlockFromUrlHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java index 8fe788378e58..a12cefa924e6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobAppendBlockHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for AppendBlock operation. */ @JacksonXmlRootElement(localName = "AppendBlob-AppendBlock-Headers") +@Fluent public final class AppendBlobAppendBlockHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java index 45fd447bde38..c2e5a3e0929e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "AppendBlob-Create-Headers") +@Fluent public final class AppendBlobCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobItem.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java index 5894e08f86e3..e63fabf516af 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendPositionAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * AppendBlobs_appendBlock, AppendBlobs_appendBlockFromUrl. */ @JacksonXmlRootElement(localName = "append-position-access-conditions") +@Fluent public final class AppendPositionAccessConditions { /* * Optional conditional header. The max length in bytes permitted for the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java index e439f5b8b089..c27f9fcac790 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAbortCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AbortCopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-AbortCopyFromURL-Headers") +@Fluent public final class BlobAbortCopyFromURLHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessConditions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java index 5bf6ef256011..d4649062bc60 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAcquireLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AcquireLease operation. */ @JacksonXmlRootElement(localName = "Blob-AcquireLease-Headers") +@Fluent public final class BlobAcquireLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java index b136802ce69a..504b7201befe 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobBreakLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for BreakLease operation. */ @JacksonXmlRootElement(localName = "Blob-BreakLease-Headers") +@Fluent public final class BlobBreakLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java index 1c3010861eaf..67d6971d9ff3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobChangeLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ChangeLease operation. */ @JacksonXmlRootElement(localName = "Blob-ChangeLease-Headers") +@Fluent public final class BlobChangeLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java index 2568e1c566bc..140b771f8cd6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-CopyFromURL-Headers") +@Fluent public final class BlobCopyFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java index f185a465e483..e27c4fde4964 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCreateSnapshotHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CreateSnapshot operation. */ @JacksonXmlRootElement(localName = "Blob-CreateSnapshot-Headers") +@Fluent public final class BlobCreateSnapshotHeaders { /* * Uniquely identifies the snapshot and indicates the snapshot version. It diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java index 7aeac53bc5a3..95e6289c3e40 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Blob-Delete-Headers") +@Fluent public final class BlobDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index aa56c2e6683c..4e9e2997ebab 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -16,6 +17,7 @@ * Defines headers for Download operation. */ @JacksonXmlRootElement(localName = "Blob-Download-Headers") +@Fluent public final class BlobDownloadHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java similarity index 94% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java index 97f8e48a9c83..ac1f703d1cd7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * The BlobFlatListSegment model. */ @JacksonXmlRootElement(localName = "Blobs") +@Fluent public final class BlobFlatListSegment { /* * The blobItems property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java index 81c8b54b4661..21243aaac732 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Blob-GetAccountInfo-Headers") +@Fluent public final class BlobGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java index cb1d9e3ba176..728ae5fd9e1e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -16,6 +17,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Blob-GetProperties-Headers") +@Fluent public final class BlobGetPropertiesHeaders { /* * Returns the date and time the blob was last modified. Any operation that diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java index aafbd1eb56e5..f25f4e566e6b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHTTPHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "blob-HTTP-headers") +@Fluent public final class BlobHTTPHeaders { /* * Optional. Sets the blob's cache control. If specified, this property is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java similarity index 93% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java index a70c2d2122f0..d90e89ab602f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java @@ -4,8 +4,8 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; import java.util.List; @@ -14,7 +14,7 @@ * The BlobHierarchyListSegment model. */ @JacksonXmlRootElement(localName = "Blobs") -@JsonDeserialize(using = CustomHierarchicalListingDeserializer.class) +@Fluent public final class BlobHierarchyListSegment { /* * The blobPrefixes property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java similarity index 88% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java index eb73dd3366b6..3d777a4b2e38 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java @@ -4,15 +4,16 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - import java.util.Map; /** * An Azure Storage blob. */ @JacksonXmlRootElement(localName = "Blob") +@Fluent public final class BlobItem { /* * The name property. @@ -50,7 +51,11 @@ public final class BlobItem { @JsonProperty(value = "Metadata") private Map metadata; - private boolean isPrefix = false; + /* + * The isPrefix property. + */ + @JsonProperty(value = "IsPrefix") + private Boolean isPrefix; /** * Get the name property: The name property. @@ -173,18 +178,21 @@ public BlobItem metadata(Map metadata) { } /** - * @return if the blob item is a prefix instead of an actual blob. + * Get the isPrefix property: The isPrefix property. + * + * @return the isPrefix value. */ - public boolean isPrefix() { - return isPrefix; + public Boolean isPrefix() { + return this.isPrefix; } /** - * Sets if the blob item is a prefix instead of an actual blob - * @param isPrefix if the item is a prefix - * @return the BlobItem object itself + * Set the isPrefix property: The isPrefix property. + * + * @param isPrefix the isPrefix value to set. + * @return the BlobItem object itself. */ - public BlobItem isPrefix(boolean isPrefix) { + public BlobItem isPrefix(Boolean isPrefix) { this.isPrefix = isPrefix; return this; } diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobListDetails.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java index 5753ff479dbf..30eed457954b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetadata.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -13,6 +14,7 @@ * The BlobMetadata model. */ @JacksonXmlRootElement(localName = "Metadata") +@Fluent public final class BlobMetadata { /* * Unmatched properties from the message are deserialized this collection diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java similarity index 93% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java index 6507aaecfd38..55afd0bc2549 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The BlobPrefix model. */ @JacksonXmlRootElement(localName = "BlobPrefix") +@Fluent public final class BlobPrefix { /* * The name property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index a297fe40e043..d5bad7b9996e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Properties of a blob. */ @JacksonXmlRootElement(localName = "Properties") +@Fluent public final class BlobProperties { /* * The creationTime property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRange.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRange.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java index 661e9a24db97..f503b9ab6d30 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobReleaseLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ReleaseLease operation. */ @JacksonXmlRootElement(localName = "Blob-ReleaseLease-Headers") +@Fluent public final class BlobReleaseLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java index 2ee66b3adb36..863157cf8a42 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRenewLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for RenewLease operation. */ @JacksonXmlRootElement(localName = "Blob-RenewLease-Headers") +@Fluent public final class BlobRenewLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java index 09111d5ae3e1..ed539d644bc1 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetHTTPHeadersHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetHTTPHeaders operation. */ @JacksonXmlRootElement(localName = "Blob-SetHTTPHeaders-Headers") +@Fluent public final class BlobSetHTTPHeadersHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java index b831d8446cd1..5b3898194287 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Blob-SetMetadata-Headers") +@Fluent public final class BlobSetMetadataHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java index d2dd04c235a7..372b1a09ebc0 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSetTierHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetTier operation. */ @JacksonXmlRootElement(localName = "Blob-SetTier-Headers") +@Fluent public final class BlobSetTierHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java index c0059d598cce..a6b195a6e6dc 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobStartCopyFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for StartCopyFromURL operation. */ @JacksonXmlRootElement(localName = "Blob-StartCopyFromURL-Headers") +@Fluent public final class BlobStartCopyFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java index 3123885e3af1..cd1ea6a55d13 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobUndeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Undelete operation. */ @JacksonXmlRootElement(localName = "Blob-Undelete-Headers") +@Fluent public final class BlobUndeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDeleteResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsDownloadResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetHTTPHeadersResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsSetTierResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobsUndeleteResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java index 8fbfcaa8a7ab..5cfa164c8c85 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Block.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * size. */ @JacksonXmlRootElement(localName = "Block") +@Fluent public final class Block { /* * The base64 encoded block ID. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java index a2605e19cf43..6bec949d7180 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobCommitBlockListHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for CommitBlockList operation. */ @JacksonXmlRootElement(localName = "BlockBlob-CommitBlockList-Headers") +@Fluent public final class BlockBlobCommitBlockListHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java index 26d77f85abad..fa50d846ebef 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobGetBlockListHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetBlockList operation. */ @JacksonXmlRootElement(localName = "BlockBlob-GetBlockList-Headers") +@Fluent public final class BlockBlobGetBlockListHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobItem.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java index 1b434c919342..88dd3c6346ed 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for StageBlockFromURL operation. */ @JacksonXmlRootElement(localName = "BlockBlob-StageBlockFromURL-Headers") +@Fluent public final class BlockBlobStageBlockFromURLHeaders { /* * If the blob has an MD5 hash and this operation is to read the full blob, diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java index 40108ad24ec2..56ffdfe93700 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobStageBlockHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for StageBlock operation. */ @JacksonXmlRootElement(localName = "BlockBlob-StageBlock-Headers") +@Fluent public final class BlockBlobStageBlockHeaders { /* * If the blob has an MD5 hash and this operation is to read the full blob, diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java index e5430e100e6e..76c59b2f74d9 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobUploadHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Upload operation. */ @JacksonXmlRootElement(localName = "BlockBlob-Upload-Headers") +@Fluent public final class BlockBlobUploadHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockItem.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockItem.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java index 70a0fb8d312e..dfa4deadeb89 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * The BlockList model. */ @JacksonXmlRootElement(localName = "BlockList") +@Fluent public final class BlockList { private static final class CommittedBlocksWrapper { @JacksonXmlProperty(localName = "Block") diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockListType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockListType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java index 9cc63338a899..40bb5d346e00 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * The BlockLookupList model. */ @JacksonXmlRootElement(localName = "BlockList") +@Fluent public final class BlockLookupList { /* * The committed property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java similarity index 95% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java index cb8d7a208ab3..e607faf87b05 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ClearRange.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The ClearRange model. */ @JacksonXmlRootElement(localName = "ClearRange") +@Fluent public final class ClearRange { /* * The start property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessConditions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAccessPolicies.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java index 0ba172f04e33..bd6d0580bdcf 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerAcquireLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for AcquireLease operation. */ @JacksonXmlRootElement(localName = "Container-AcquireLease-Headers") +@Fluent public final class ContainerAcquireLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java index 98a1106ccc6e..4df2a5f3ddef 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerBreakLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for BreakLease operation. */ @JacksonXmlRootElement(localName = "Container-BreakLease-Headers") +@Fluent public final class ContainerBreakLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java index 880214fc46b5..8c5371a5121f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerChangeLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ChangeLease operation. */ @JacksonXmlRootElement(localName = "Container-ChangeLease-Headers") +@Fluent public final class ContainerChangeLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java index 280734c61501..9a22e560ca72 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "Container-Create-Headers") +@Fluent public final class ContainerCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java index 52f2623a635d..64af976e0367 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Delete operation. */ @JacksonXmlRootElement(localName = "Container-Delete-Headers") +@Fluent public final class ContainerDeleteHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java index 4905b3c2949f..a1a76b2f57ba 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Container-GetAccessPolicy-Headers") +@Fluent public final class ContainerGetAccessPolicyHeaders { /* * Indicated whether data in the container may be accessed publicly and the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java index c82baa2c1a6b..692c4a71fc52 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Container-GetAccountInfo-Headers") +@Fluent public final class ContainerGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java index b37286c1b7af..df2d12bbcdb6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerGetPropertiesHeaders.java @@ -4,8 +4,9 @@ package com.azure.storage.blob.models; -import com.azure.core.annotations.HeaderCollection; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; +import com.azure.core.implementation.annotation.HeaderCollection; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -15,6 +16,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Container-GetProperties-Headers") +@Fluent public final class ContainerGetPropertiesHeaders { /* * The metadata property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java index a334568661eb..543085f349c8 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerItem.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -12,6 +13,7 @@ * An Azure Storage container. */ @JacksonXmlRootElement(localName = "Container") +@Fluent public final class ContainerItem { /* * The name property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java index 311c0c6ca66b..ef1252a5a8d4 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobFlatSegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListBlobFlatSegment operation. */ @JacksonXmlRootElement(localName = "Container-ListBlobFlatSegment-Headers") +@Fluent public final class ContainerListBlobFlatSegmentHeaders { /* * The media type of the body of the response. For List Blobs this is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java index 7456e14d8980..d1a671cf7550 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListBlobHierarchySegmentHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ListBlobHierarchySegment operation. */ @JacksonXmlRootElement(localName = "Container-ListBlobHierarchySegment-Headers") +@Fluent public final class ContainerListBlobHierarchySegmentHeaders { /* * The media type of the body of the response. For List Blobs this is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java similarity index 88% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java index f51d897112d5..fbca16f733d7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerListDetails.java @@ -3,11 +3,11 @@ package com.azure.storage.blob.models; -import com.azure.storage.blob.StorageClient; +import com.azure.storage.blob.BlobServiceClient; /** * This type allows users to specify additional information the service should return with each container when listing - * containers in an account (via a {@link StorageClient} object). This type is immutable to ensure thread-safety of + * containers in an account (via a {@link BlobServiceClient} object). This type is immutable to ensure thread-safety of * requests, so changing the details for a different listing operation requires construction of a new object. Null may * be passed if none of the options are desirable. */ diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java index b4844ac52dcf..f159a57f2cd5 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerProperties.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Properties of a container. */ @JacksonXmlRootElement(localName = "ContainerProperties") +@Fluent public final class ContainerProperties { /* * The lastModified property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java index b437d814e16c..7a8766ab2424 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerReleaseLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for ReleaseLease operation. */ @JacksonXmlRootElement(localName = "Container-ReleaseLease-Headers") +@Fluent public final class ContainerReleaseLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java index e9a03210ae1a..a192e95a96c8 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerRenewLeaseHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for RenewLease operation. */ @JacksonXmlRootElement(localName = "Container-RenewLease-Headers") +@Fluent public final class ContainerRenewLeaseHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java index a91ceed6d34d..763e75291800 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetAccessPolicyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetAccessPolicy operation. */ @JacksonXmlRootElement(localName = "Container-SetAccessPolicy-Headers") +@Fluent public final class ContainerSetAccessPolicyHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java index 082886b7c0b5..e685322b83ff 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainerSetMetadataHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for SetMetadata operation. */ @JacksonXmlRootElement(localName = "Container-SetMetadata-Headers") +@Fluent public final class ContainerSetMetadataHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersCreateResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersDeleteResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CorsRule.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CorsRule.java index fa9035b072c6..e111fbb62e30 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CorsRule.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CorsRule.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -15,6 +16,7 @@ * one domain (the origin domain) to call APIs in another domain. */ @JacksonXmlRootElement(localName = "CorsRule") +@Fluent public final class CorsRule { /* * The origin domains that are permitted to make a request against the diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CustomHierarchicalListingDeserializer.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java index 90cf41b12f07..d583130cc13a 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Geo-Replication information for the Secondary Storage Service. */ @JacksonXmlRootElement(localName = "GeoReplication") +@Fluent public final class GeoReplication { /* * The status of the secondary location. Possible values include: 'live', diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatusType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatusType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatusType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java index d1aa23bbcef7..6c742e4ed786 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Key information. */ @JacksonXmlRootElement(localName = "KeyInfo") +@Fluent public final class KeyInfo { /* * The date-time the key is active in ISO 8601 UTC time diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java similarity index 95% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java index eae367a636e2..9a43064e549f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "lease-access-conditions") +@Fluent public final class LeaseAccessConditions { /* * If specified, the operation only succeeds if the resource's lease is diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java index 1807bc8efe36..593688ccc3e1 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * An enumeration of blobs. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListBlobsFlatSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java index f79c285a1079..51aee2856567 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * An enumeration of blobs. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListBlobsHierarchySegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersIncludeType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java index 19d3e61a2c75..ed6c27b57d90 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersOptions.java @@ -3,10 +3,10 @@ package com.azure.storage.blob.models; -import com.azure.storage.blob.StorageClient; +import com.azure.storage.blob.BlobServiceClient; /** - * Defines options available to configure the behavior of a call to listContainersSegment on a {@link StorageClient} + * Defines options available to configure the behavior of a call to listContainersSegment on a {@link BlobServiceClient} * object. See the constructor for details on each of the options. Null may be passed in place of an object of this * type if no options are desirable. */ diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java index deafc07a9443..97f342484a8f 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListContainersSegmentResponse.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * An enumeration of containers. */ @JacksonXmlRootElement(localName = "EnumerationResults") +@Fluent public final class ListContainersSegmentResponse { /* * The serviceEndpoint property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Logging.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Logging.java index e86ad32a0ae7..9aa3f4cce40b 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Logging.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Logging.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Azure Analytics Logging settings. */ @JacksonXmlRootElement(localName = "Logging") +@Fluent public final class Logging { /* * The version of Storage Analytics to configure. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metadata.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metadata.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/Metadata.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metadata.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metrics.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metrics.java index c812d6a86a53..ee8ad19b2856 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/Metrics.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Metrics.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * for blobs. */ @JacksonXmlRootElement(localName = "Metrics") +@Fluent public final class Metrics { /* * The version of Storage Analytics to configure. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java index 3636dfd4c290..01e9de89ae16 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ModifiedAccessConditions.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "modified-access-conditions") +@Fluent public final class ModifiedAccessConditions { /* * Specify this header value to operate only on a blob if it has been diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobAccessConditions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java index 45f30cefd53a..543c829bf271 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobClearPagesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for ClearPages operation. */ @JacksonXmlRootElement(localName = "PageBlob-ClearPages-Headers") +@Fluent public final class PageBlobClearPagesHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java index 3a1ea5cd5f9d..7e9aa95c1ff3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCopyIncrementalHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for CopyIncremental operation. */ @JacksonXmlRootElement(localName = "PageBlob-CopyIncremental-Headers") +@Fluent public final class PageBlobCopyIncrementalHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java index 215c6f4c934a..6c4192fe4806 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobCreateHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for Create operation. */ @JacksonXmlRootElement(localName = "PageBlob-Create-Headers") +@Fluent public final class PageBlobCreateHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java index 5f75cf82af76..c1d14635bf44 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesDiffHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetPageRangesDiff operation. */ @JacksonXmlRootElement(localName = "PageBlob-GetPageRangesDiff-Headers") +@Fluent public final class PageBlobGetPageRangesDiffHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java index a9004d8dd2c9..32b37ef1452c 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobGetPageRangesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetPageRanges operation. */ @JacksonXmlRootElement(localName = "PageBlob-GetPageRanges-Headers") +@Fluent public final class PageBlobGetPageRangesHeaders { /* * Returns the date and time the container was last modified. Any operation diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobItem.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java index f9396b66835c..e03c8720d2b6 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobResizeHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for Resize operation. */ @JacksonXmlRootElement(localName = "PageBlob-Resize-Headers") +@Fluent public final class PageBlobResizeHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java index 317c57bb35ce..5f606b24c262 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUpdateSequenceNumberHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for UpdateSequenceNumber operation. */ @JacksonXmlRootElement(localName = "PageBlob-UpdateSequenceNumber-Headers") +@Fluent public final class PageBlobUpdateSequenceNumberHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java index ad21b582b509..cebeb20842e3 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesFromURLHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for UploadPagesFromURL operation. */ @JacksonXmlRootElement(localName = "PageBlob-UploadPagesFromURL-Headers") +@Fluent public final class PageBlobUploadPagesFromURLHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java index 29cf41bae0b8..7dd8eb12ae72 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobUploadPagesHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.azure.core.implementation.util.ImplUtils; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -14,6 +15,7 @@ * Defines headers for UploadPages operation. */ @JacksonXmlRootElement(localName = "PageBlob-UploadPages-Headers") +@Fluent public final class PageBlobUploadPagesHeaders { /* * The ETag contains a value that you can use to perform operations diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsCreateResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsResizeResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java index cf921ab92646..b981bdf2f6ed 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.ArrayList; @@ -13,6 +14,7 @@ * the list of pages. */ @JacksonXmlRootElement(localName = "PageList") +@Fluent public final class PageList { /* * The pageRange property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java similarity index 95% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java index 5ce78ebfb0db..53a76779cd4d 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PageRange.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The PageRange model. */ @JacksonXmlRootElement(localName = "PageRange") +@Fluent public final class PageRange { /* * The start property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ReliableDownloadOptions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java index d6285c64af18..7877f6dd0bd7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RetentionPolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * persist. */ @JacksonXmlRootElement(localName = "RetentionPolicy") +@Fluent public final class RetentionPolicy { /* * Indicates whether a retention policy is enabled for the storage service diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java index df0399ff5912..c211020aeb24 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberAccessConditions.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -12,6 +13,7 @@ * PageBlobs_uploadPages, PageBlobs_clearPages, PageBlobs_uploadPagesFromURL. */ @JacksonXmlRootElement(localName = "sequence-number-access-conditions") +@Fluent public final class SequenceNumberAccessConditions { /* * Specify this header value to operate only on a blob if it has a sequence diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java index b0c6820cf084..88fa50830518 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetAccountInfoHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetAccountInfo operation. */ @JacksonXmlRootElement(localName = "Service-GetAccountInfo-Headers") +@Fluent public final class ServiceGetAccountInfoHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java index 3126a5153421..3b5b06ab3259 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for GetProperties operation. */ @JacksonXmlRootElement(localName = "Service-GetProperties-Headers") +@Fluent public final class ServiceGetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java index 34fcda3653a6..55dda9cc8ddb 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetStatisticsHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetStatistics operation. */ @JacksonXmlRootElement(localName = "Service-GetStatistics-Headers") +@Fluent public final class ServiceGetStatisticsHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java index 9c685c290610..4a74086587af 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceGetUserDelegationKeyHeaders.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Defines headers for GetUserDelegationKey operation. */ @JacksonXmlRootElement(localName = "Service-GetUserDelegationKey-Headers") +@Fluent public final class ServiceGetUserDelegationKeyHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java index d22b9f1febc4..94908506ede7 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceListContainersSegmentHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for ListContainersSegment operation. */ @JacksonXmlRootElement(localName = "Service-ListContainersSegment-Headers") +@Fluent public final class ServiceListContainersSegmentHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java index 065e595244fc..df15cc766400 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServiceSetPropertiesHeaders.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Defines headers for SetProperties operation. */ @JacksonXmlRootElement(localName = "Service-SetProperties-Headers") +@Fluent public final class ServiceSetPropertiesHeaders { /* * This header uniquely identifies the request that was made and can be diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesListContainersSegmentResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesResponse.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java index 417f49492e51..63e3aea5e584 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SignedIdentifier.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * signed identifier. */ @JacksonXmlRootElement(localName = "SignedIdentifier") +@Fluent public final class SignedIdentifier { /* * a unique id diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SkuName.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SkuName.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java index 84b179bb0181..9874a3b9557e 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SourceModifiedAccessConditions.java @@ -5,6 +5,7 @@ package com.azure.storage.blob.models; import com.azure.core.implementation.DateTimeRfc1123; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -13,6 +14,7 @@ * Additional parameters for a set of operations. */ @JacksonXmlRootElement(localName = "source-modified-access-conditions") +@Fluent public final class SourceModifiedAccessConditions { /* * Specify this header value to operate only on a blob if it has been diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java similarity index 97% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java index 45971febb06e..91fffc8ba4bc 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The properties that enable an account to host a static website. */ @JacksonXmlRootElement(localName = "StaticWebsite") +@Fluent public final class StaticWebsite { /* * Indicates whether this account is hosting a static website diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageAccountInfo.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageError.java similarity index 96% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageError.java index 55c96be21c80..2f8f01f4f6f9 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageError.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageError.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * The StorageError model. */ @JacksonXmlRootElement(localName = "StorageError") +@Fluent public final class StorageError { /* * The code property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorCode.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageErrorException.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorException.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageErrorException.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageErrorException.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java similarity index 99% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java index 79e072ba2b05..a83c072fcce9 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceProperties.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -15,6 +16,7 @@ * Storage Service Properties. */ @JacksonXmlRootElement(localName = "StorageServiceProperties") +@Fluent public final class StorageServiceProperties { /* * The logging property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java similarity index 94% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java index 5eb67c323064..04dd8dfc94dd 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StorageServiceStats.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -11,6 +12,7 @@ * Stats for the storage service. */ @JacksonXmlRootElement(localName = "StorageServiceStats") +@Fluent public final class StorageServiceStats { /* * The geoReplication property. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java similarity index 98% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java index d267df92d7c2..7598fd90340d 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.models; +import com.azure.core.implementation.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -12,6 +13,7 @@ * A user delegation key. */ @JacksonXmlRootElement(localName = "UserDelegationKey") +@Fluent public final class UserDelegationKey { /* * The Azure Active Directory object ID in GUID format. diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/blob/models/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/blob/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java similarity index 77% rename from storage/client/blob/src/main/java/com/azure/storage/blob/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java index 6048911e2d09..54ad22687275 100644 --- a/storage/client/blob/src/main/java/com/azure/storage/blob/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java @@ -3,6 +3,6 @@ // Code generated by Microsoft (R) AutoRest Code Generator /** - * Package containing the classes for StorageClient. + * Package containing the classes for BlobServiceClient. */ package com.azure.storage.blob; diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/credentials/SASTokenCredential.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/SASTokenCredential.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/credentials/SASTokenCredential.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/SASTokenCredential.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/SharedKeyCredential.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/credentials/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/package-info.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/credentials/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/credentials/package-info.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RequestRetryPolicy.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/RetryPolicyType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RetryPolicyType.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/RetryPolicyType.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/RetryPolicyType.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/SASTokenCredentialPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/SASTokenCredentialPolicy.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/SASTokenCredentialPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/SASTokenCredentialPolicy.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/SharedKeyCredentialPolicy.java diff --git a/storage/client/blob/src/main/java/com/azure/storage/common/policy/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/package-info.java similarity index 100% rename from storage/client/blob/src/main/java/com/azure/storage/common/policy/package-info.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/common/policy/package-info.java diff --git a/storage/client/blob/src/samples/java/AzureIdentityExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java similarity index 89% rename from storage/client/blob/src/samples/java/AzureIdentityExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java index 6550c8c02a76..9945273cbccd 100644 --- a/storage/client/blob/src/samples/java/AzureIdentityExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/AzureIdentityExample.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +package com.azure.storage.blob; + import com.azure.identity.credential.DefaultAzureCredential; -import com.azure.storage.blob.StorageClient; -import com.azure.storage.blob.StorageClientBuilder; import java.util.Locale; @@ -30,7 +30,7 @@ public static void main(String[] args) { /* * Create a storage client using the Azure Identity credentials. */ - StorageClient storageClient = new StorageClientBuilder() + BlobServiceClient storageClient = new BlobServiceClientBuilder() .endpoint(endpoint) .credential(new DefaultAzureCredential()) .buildClient(); diff --git a/storage/client/blob/src/samples/java/BasicExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java similarity index 91% rename from storage/client/blob/src/samples/java/BasicExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java index 3f8edbd367cb..c47e753b3f07 100644 --- a/storage/client/blob/src/samples/java/BasicExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BasicExample.java @@ -1,10 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.storage.blob.BlockBlobClient; -import com.azure.storage.blob.ContainerClient; -import com.azure.storage.blob.StorageClient; -import com.azure.storage.blob.StorageClientBuilder; +package com.azure.storage.blob; + import com.azure.storage.common.credentials.SharedKeyCredential; import java.io.ByteArrayInputStream; @@ -46,9 +44,9 @@ public static void main(String[] args) throws IOException { String endpoint = String.format(Locale.ROOT, "https://%s.blob.core.windows.net", accountName); /* - * Create a StorageClient object that wraps the service endpoint, credential and a request pipeline. + * Create a BlobServiceClient object that wraps the service endpoint, credential and a request pipeline. */ - StorageClient storageClient = new StorageClientBuilder().endpoint(endpoint).credential(credential).buildClient(); + BlobServiceClient storageClient = new BlobServiceClientBuilder().endpoint(endpoint).credential(credential).buildClient(); /* * This example shows several common operations just to get you started. diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java new file mode 100644 index 000000000000..3b82eabc7bcf --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob; + +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.Metadata; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ReliableDownloadOptions; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.URL; +import java.time.OffsetDateTime; +import java.util.Collections; + +/** + * Code snippets for {@link BlobAsyncClient} + */ +@SuppressWarnings("unused") +public class BlobAsyncClientJavaDocCodeSnippets { + private BlobAsyncClient client = JavaDocCodeSnippetsHelpers.getBlobAsyncClient("blobName"); + private String leaseId = "leaseId"; + private String copyId = "copyId"; + private URL url = JavaDocCodeSnippetsHelpers.generateURL("https://sample.com"); + private String file = "file"; + + /** + * Code snippet for {@link BlobAsyncClient#exists()} + */ + public void existsCodeSnippet() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.exists + client.exists().subscribe(response -> System.out.printf("Exists? %b%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.exists + } + + /** + * Code snippets for {@link BlobAsyncClient#startCopyFromURL(URL)} and + * {@link BlobAsyncClient#startCopyFromURL(URL, Metadata, ModifiedAccessConditions, BlobAccessConditions)} + */ + public void startCopyFromURL() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL + client.startCopyFromURL(url) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions + Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.startCopyFromURL(url, metadata, modifiedAccessConditions, blobAccessConditions) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#abortCopyFromURL(String)} and + * {@link BlobAsyncClient#abortCopyFromURL(String, LeaseAccessConditions)} + */ + public void abortCopyFromURL() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String + client.abortCopyFromURL(copyId) + .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String-LeaseAccessConditions + LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().leaseId(leaseId); + client.abortCopyFromURL(copyId, leaseAccessConditions) + .subscribe(response -> System.out.printf("Aborted copy completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.abortCopyFromURL#String-LeaseAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#copyFromURL(URL)} and + * {@link BlobAsyncClient#copyFromURL(URL, Metadata, ModifiedAccessConditions, BlobAccessConditions)} + */ + public void copyFromURL() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL + client.copyFromURL(url).subscribe(response -> System.out.printf("Copy identifier: %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions + Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.copyFromURL(url, metadata, modifiedAccessConditions, blobAccessConditions) + .subscribe(response -> System.out.printf("Copy identifier: %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#download()} and + * {@link BlobAsyncClient#download(BlobRange, ReliableDownloadOptions, BlobAccessConditions, boolean)} + * + * @throws UncheckedIOException If an I/O error occurs + */ + public void download() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.download + client.download().subscribe(response -> { + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + response.value().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + }); + // END: com.azure.storage.blob.BlobAsyncClient.download + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + BlobRange range = new BlobRange(1024, 2048); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.download(range, options, null, false).subscribe(response -> { + ByteArrayOutputStream downloadData = new ByteArrayOutputStream(); + response.value().subscribe(piece -> { + try { + downloadData.write(piece.array()); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + }); + // END: com.azure.storage.blob.BlobAsyncClient.download#BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean + } + + /** + * Code snippets for {@link BlobAsyncClient#downloadToFile(String)} and + * {@link BlobAsyncClient#downloadToFile(String, BlobRange, Integer, ReliableDownloadOptions, BlobAccessConditions, boolean)} + */ + public void downloadToFile() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String + client.downloadToFile(file).subscribe(response -> System.out.println("Completed download to file")); + // END: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean + BlobRange range = new BlobRange(1024, 2048); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadToFile(file, range, null, options, null, false) + .subscribe(response -> System.out.println("Completed download to file")); + // END: com.azure.storage.blob.BlobAsyncClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean + } + + /** + * Code snippets for {@link BlobAsyncClient#delete()} and + * {@link BlobAsyncClient#delete(DeleteSnapshotsOptionType, BlobAccessConditions)} + */ + public void delete() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.delete + client.delete() + .subscribe(response -> System.out.printf("Delete completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.delete + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions + client.delete(DeleteSnapshotsOptionType.INCLUDE, null) + .subscribe(response -> System.out.printf("Delete completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#getProperties()} and + * {@link BlobAsyncClient#getProperties(BlobAccessConditions)} + */ + public void getProperties() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.getProperties + client.getProperties().subscribe(response -> + System.out.printf("Type: %s, Size: %d%n", response.value().blobType(), response.value().blobSize())); + // END: com.azure.storage.blob.BlobAsyncClient.getProperties + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.getProperties#BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.getProperties(accessConditions).subscribe(response -> + System.out.printf("Type: %s, Size: %d%n", response.value().blobType(), response.value().blobSize())); + // END: com.azure.storage.blob.BlobAsyncClient.getProperties#BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#setHTTPHeaders(BlobHTTPHeaders)} and + * {@link BlobAsyncClient#setHTTPHeaders(BlobHTTPHeaders, BlobAccessConditions)} + */ + public void setHTTPHeaders() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders + client.setHTTPHeaders(new BlobHTTPHeaders() + .blobContentLanguage("en-US") + .blobContentType("binary")).subscribe(response -> + System.out.printf("Set HTTP headers completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.setHTTPHeaders(new BlobHTTPHeaders() + .blobContentLanguage("en-US") + .blobContentType("binary"), accessConditions).subscribe(response -> + System.out.printf("Set HTTP headers completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#setMetadata(Metadata)} and + * {@link BlobAsyncClient#setMetadata(Metadata, BlobAccessConditions)} + */ + public void setMetadata() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata + client.setMetadata(new Metadata(Collections.singletonMap("metadata", "value"))) + .subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata-BlobAccessConditions + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.setMetadata(new Metadata(Collections.singletonMap("metadata", "value")), accessConditions) + .subscribe(response -> System.out.printf("Set metadata completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setMetadata#Metadata-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#createSnapshot()} and + * {@link BlobAsyncClient#createSnapshot(Metadata, BlobAccessConditions)} + */ + public void createSnapshot() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.createSnapshot + client.createSnapshot() + .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.createSnapshot + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.createSnapshot#Metadata-BlobAccessConditions + Metadata snapshotMetadata = new Metadata(Collections.singletonMap("metadata", "value")); + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + client.createSnapshot(snapshotMetadata, accessConditions) + .subscribe(response -> System.out.printf("Identifier for the snapshot is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.createSnapshot#Metadata-BlobAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#setTier(AccessTier)} and + * {@link BlobAsyncClient#setTier(AccessTier, LeaseAccessConditions)} + */ + public void setTier() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier + client.setTier(AccessTier.HOT) + .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier-LeaseAccessConditions + LeaseAccessConditions accessConditions = new LeaseAccessConditions().leaseId(leaseId); + + client.setTier(AccessTier.HOT, accessConditions) + .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.setTier#AccessTier-LeaseAccessConditions + } + + /** + * Code snippet for {@link BlobAsyncClient#undelete()} + */ + public void undelete() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.undelete + client.undelete() + .subscribe(response -> System.out.printf("Undelete completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.undelete + } + + /** + * Code snippets for {@link BlobAsyncClient#acquireLease(String, int)} and + * {@link BlobAsyncClient#acquireLease(String, int, ModifiedAccessConditions)} + */ + public void acquireLease() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int + client.acquireLease("proposedId", 60) + .subscribe(response -> System.out.printf("Lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int-ModifiedAccessConditions + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifModifiedSince(OffsetDateTime.now().minusDays(3)); + + client.acquireLease("proposedId", 60, modifiedAccessConditions) + .subscribe(response -> System.out.printf("Lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.acquireLease#String-int-ModifiedAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#renewLease(String)} and + * {@link BlobAsyncClient#renewLease(String, ModifiedAccessConditions)} + */ + public void renewLease() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.renewLease#String + client.renewLease(leaseId) + .subscribe(response -> System.out.printf("Renewed lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.renewLease#String + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.renewLease#String-ModifiedAccessConditions + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + client.renewLease(leaseId, modifiedAccessConditions) + .subscribe(response -> System.out.printf("Renewed lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.renewLease#String-ModifiedAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#releaseLease(String)} and + * {@link BlobAsyncClient#releaseLease(String, ModifiedAccessConditions)} + */ + public void releaseLease() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.releaseLease#String + client.releaseLease(leaseId) + .subscribe(response -> System.out.printf("Release lease completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.releaseLease#String + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.releaseLease#String-ModifiedAccessConditions + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + client.releaseLease(leaseId, modifiedAccessConditions) + .subscribe(response -> System.out.printf("Release lease completed with status %d%n", response.statusCode())); + // END: com.azure.storage.blob.BlobAsyncClient.releaseLease#String-ModifiedAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#breakLease()} and + * {@link BlobAsyncClient#breakLease(Integer, ModifiedAccessConditions)} + */ + public void breakLease() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.breakLease + client.breakLease() + .subscribe(response -> + System.out.printf("The broken lease has %d seconds remaining on the lease", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.breakLease + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.breakLease#Integer-ModifiedAccessConditions + Integer retainLeaseInSeconds = 5; + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + client.breakLease(retainLeaseInSeconds, modifiedAccessConditions) + .subscribe(response -> + System.out.printf("The broken lease has %d seconds remaining on the lease", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.breakLease#Integer-ModifiedAccessConditions + } + + /** + * Code snippets for {@link BlobAsyncClient#changeLease(String, String)} and + * {@link BlobAsyncClient#changeLease(String, String, ModifiedAccessConditions)} + */ + public void changeLease() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.changeLease#String-String + client.changeLease(leaseId, "proposedId") + .subscribe(response -> System.out.printf("Changed lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.changeLease#String-String + + // BEGIN: com.azure.storage.blob.BlobAsyncClient.changeLease#String-String-ModifiedAccessConditions + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + client.changeLease(leaseId, "proposedId", modifiedAccessConditions) + .subscribe(response -> System.out.printf("Changed lease ID is %s%n", response.value())); + // END: com.azure.storage.blob.BlobAsyncClient.changeLease#String-String-ModifiedAccessConditions + } + + /** + * Code snippet for {@link BlobAsyncClient#getAccountInfo()} + */ + public void getAccountInfo() { + // BEGIN: com.azure.storage.blob.BlobAsyncClient.getAccountInfo + client.getAccountInfo().subscribe(response -> System.out.printf("Account Kind: %s, SKU: %s%n", + response.value().accountKind(), response.value().skuName())); + // END: com.azure.storage.blob.BlobAsyncClient.getAccountInfo + } +} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java new file mode 100644 index 000000000000..d99b83f910ad --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob; + +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobAccessConditions; +import com.azure.storage.blob.models.BlobHTTPHeaders; +import com.azure.storage.blob.models.BlobRange; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.LeaseAccessConditions; +import com.azure.storage.blob.models.Metadata; +import com.azure.storage.blob.models.ModifiedAccessConditions; +import com.azure.storage.blob.models.ReliableDownloadOptions; +import com.azure.storage.blob.models.StorageAccountInfo; + +import java.io.ByteArrayOutputStream; +import java.io.OutputStream; +import java.net.URL; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Collections; + +/** + * Code snippets for {@link BlobClient} + */ +@SuppressWarnings("unused") +public class BlobClientJavaDocCodeSnippets { + private BlobClient client = JavaDocCodeSnippetsHelpers.getBlobClient("blobName"); + private String leaseId = "leaseId"; + private String copyId = "copyId"; + private URL url = JavaDocCodeSnippetsHelpers.generateURL("https://sample.com"); + private String file = "file"; + private Duration timeout = Duration.ofSeconds(30); + + /** + * Code snippets for {@link BlobClient#exists()} and {@link BlobClient#exists(Duration)} + */ + public void existsCodeSnippet() { + // BEGIN: com.azure.storage.blob.BlobClient.exists + System.out.printf("Exists? %b%n", client.exists().value()); + // END: com.azure.storage.blob.BlobClient.exists + + // BEGIN: com.azure.storage.blob.BlobClient.exists#Duration + System.out.printf("Exists? %b%n", client.exists(timeout).value()); + // END: com.azure.storage.blob.BlobClient.exists#Duration + } + + /** + * Code snippets for {@link BlobClient#startCopyFromURL(URL)} and + * {@link BlobClient#startCopyFromURL(URL, Metadata, ModifiedAccessConditions, BlobAccessConditions, Duration)} + */ + public void startCopyFromURL() { + // BEGIN: com.azure.storage.blob.BlobClient.startCopyFromURL#URL + System.out.printf("Copy identifier: %s%n", client.startCopyFromURL(url).value()); + // END: com.azure.storage.blob.BlobClient.startCopyFromURL#URL + + // BEGIN: com.azure.storage.blob.BlobClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration + Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + System.out.printf("Copy identifier: %s%n", + client.startCopyFromURL(url, metadata, modifiedAccessConditions, blobAccessConditions, timeout)); + // END: com.azure.storage.blob.BlobClient.startCopyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#abortCopyFromURL(String)} and + * {@link BlobClient#abortCopyFromURL(String, LeaseAccessConditions, Duration)} + */ + public void abortCopyFromURL() { + // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURL#String + System.out.printf("Aborted copy completed with status %d%n", client.abortCopyFromURL(copyId).statusCode()); + // END: com.azure.storage.blob.BlobClient.abortCopyFromURL#String + + // BEGIN: com.azure.storage.blob.BlobClient.abortCopyFromURL#String-LeaseAccessConditions-Duration + LeaseAccessConditions leaseAccessConditions = new LeaseAccessConditions().leaseId(leaseId); + System.out.printf("Aborted copy completed with status %d%n", + client.abortCopyFromURL(copyId, leaseAccessConditions, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.abortCopyFromURL#String-LeaseAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#copyFromURL(URL)} and + * {@link BlobClient#copyFromURL(URL, Metadata, ModifiedAccessConditions, BlobAccessConditions, Duration)} + */ + public void copyFromURL() { + // BEGIN: com.azure.storage.blob.BlobClient.copyFromURL#URL + System.out.printf("Copy identifier: %s%n", client.copyFromURL(url).value()); + // END: com.azure.storage.blob.BlobClient.copyFromURL#URL + + // BEGIN: com.azure.storage.blob.BlobClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration + Metadata metadata = new Metadata(Collections.singletonMap("metadata", "value")); + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(7)); + BlobAccessConditions blobAccessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + System.out.printf("Copy identifier: %s%n", + client.copyFromURL(url, metadata, modifiedAccessConditions, blobAccessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.copyFromURL#URL-Metadata-ModifiedAccessConditions-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#download(OutputStream)} and + * {@link BlobClient#download(OutputStream, BlobRange, ReliableDownloadOptions, BlobAccessConditions, boolean, Duration)} + */ + public void download() { + // BEGIN: com.azure.storage.blob.BlobClient.download#OutputStream + System.out.printf("Download completed with status %d%n", + client.download(new ByteArrayOutputStream()).statusCode()); + // END: com.azure.storage.blob.BlobClient.download#OutputStream + + // BEGIN: com.azure.storage.blob.BlobClient.download#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration + BlobRange range = new BlobRange(1024, 2048); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + System.out.printf("Download completed with status %d%n", + client.download(new ByteArrayOutputStream(), range, options, null, false, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.download#OutputStream-BlobRange-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration + } + + /** + * Code snippets for {@link BlobClient#downloadToFile(String)} and + * {@link BlobClient#downloadToFile(String, BlobRange, Integer, ReliableDownloadOptions, BlobAccessConditions, boolean, Duration)} + */ + public void downloadToFile() { + // BEGIN: com.azure.storage.blob.BlobClient.downloadToFile#String + client.downloadToFile(file); + System.out.println("Completed download to file"); + // END: com.azure.storage.blob.BlobClient.downloadToFile#String + + // BEGIN: com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration + BlobRange range = new BlobRange(1024, 2048); + ReliableDownloadOptions options = new ReliableDownloadOptions().maxRetryRequests(5); + + client.downloadToFile(file, range, null, options, null, false, timeout); + System.out.println("Completed download to file"); + // END: com.azure.storage.blob.BlobClient.downloadToFile#String-BlobRange-Integer-ReliableDownloadOptions-BlobAccessConditions-boolean-Duration + } + + /** + * Code snippets for {@link BlobClient#delete()} and + * {@link BlobClient#delete(DeleteSnapshotsOptionType, BlobAccessConditions, Duration)} + */ + public void delete() { + // BEGIN: com.azure.storage.blob.BlobClient.delete + System.out.printf("Delete completed with status %d%n", client.delete().statusCode()); + // END: com.azure.storage.blob.BlobClient.delete + + // BEGIN: com.azure.storage.blob.BlobClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions-Duration + System.out.printf("Delete completed with status %d%n", + client.delete(DeleteSnapshotsOptionType.INCLUDE, null, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.delete#DeleteSnapshotsOptionType-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#getProperties()} + */ + public void getProperties() { + // BEGIN: com.azure.storage.blob.BlobClient.getProperties + BlobProperties properties = client.getProperties().value(); + System.out.printf("Type: %s, Size: %d%n", properties.blobType(), properties.blobSize()); + // END: com.azure.storage.blob.BlobClient.getProperties + } + + /** + * Code snippet for {@link BlobClient#getProperties(BlobAccessConditions, Duration)} + */ + public void getPropertiesWithTimeout() { + // BEGIN: com.azure.storage.blob.BlobClient.getProperties#BlobAccessConditions-Duration + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + BlobProperties properties = client.getProperties(accessConditions, timeout).value(); + System.out.printf("Type: %s, Size: %d%n", properties.blobType(), properties.blobSize()); + // END: com.azure.storage.blob.BlobClient.getProperties#BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#setHTTPHeaders(BlobHTTPHeaders)} and + * {@link BlobClient#setHTTPHeaders(BlobHTTPHeaders, BlobAccessConditions, Duration)} + */ + public void setHTTPHeaders() { + // BEGIN: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders + System.out.printf("Set HTTP headers completed with status %d%n", + client.setHTTPHeaders(new BlobHTTPHeaders() + .blobContentLanguage("en-US") + .blobContentType("binary")) + .statusCode()); + // END: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders + + // BEGIN: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions-Duration + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + System.out.printf("Set HTTP headers completed with status %d%n", + client.setHTTPHeaders(new BlobHTTPHeaders() + .blobContentLanguage("en-US") + .blobContentType("binary"), accessConditions, timeout) + .statusCode()); + // END: com.azure.storage.blob.BlobClient.setHTTPHeaders#BlobHTTPHeaders-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#setMetadata(Metadata)} and + * {@link BlobClient#setMetadata(Metadata, BlobAccessConditions, Duration)} + */ + public void setMetadata() { + // BEGIN: com.azure.storage.blob.BlobClient.setMetadata#Metadata + System.out.printf("Set metadata completed with status %d%n", + client.setMetadata(new Metadata(Collections.singletonMap("metadata", "value"))).statusCode()); + // END: com.azure.storage.blob.BlobClient.setMetadata#Metadata + + // BEGIN: com.azure.storage.blob.BlobClient.setMetadata#Metadata-BlobAccessConditions-Duration + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + System.out.printf("Set metadata completed with status %d%n", + client.setMetadata( + new Metadata(Collections.singletonMap("metadata", "value")), accessConditions, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.setMetadata#Metadata-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#createSnapshot()} and + * {@link BlobClient#createSnapshot(Metadata, BlobAccessConditions, Duration)} + */ + public void createSnapshot() { + // BEGIN: com.azure.storage.blob.BlobClient.createSnapshot + System.out.printf("Identifier for the snapshot is %s%n", client.createSnapshot().value()); + // END: com.azure.storage.blob.BlobClient.createSnapshot + + // BEGIN: com.azure.storage.blob.BlobClient.createSnapshot#Metadata-BlobAccessConditions-Duration + Metadata snapshotMetadata = new Metadata(Collections.singletonMap("metadata", "value")); + BlobAccessConditions accessConditions = new BlobAccessConditions() + .leaseAccessConditions(new LeaseAccessConditions().leaseId(leaseId)); + + System.out.printf("Identifier for the snapshot is %s%n", + client.createSnapshot(snapshotMetadata, accessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.createSnapshot#Metadata-BlobAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#setTier(AccessTier)} and + * {@link BlobClient#setTier(AccessTier, LeaseAccessConditions, Duration)} + */ + public void setTier() { + // BEGIN: com.azure.storage.blob.BlobClient.setTier#AccessTier + System.out.printf("Set tier completed with status code %d%n", client.setTier(AccessTier.HOT).statusCode()); + // END: com.azure.storage.blob.BlobClient.setTier#AccessTier + + // BEGIN: com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration + LeaseAccessConditions accessConditions = new LeaseAccessConditions().leaseId(leaseId); + + System.out.printf("Set tier completed with status code %d%n", + client.setTier(AccessTier.HOT, accessConditions, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#undelete()} and {@link BlobClient#undelete(Duration)} + */ + public void undelete() { + // BEGIN: com.azure.storage.blob.BlobClient.undelete + System.out.printf("Undelete completed with status %d%n", client.undelete().statusCode()); + // END: com.azure.storage.blob.BlobClient.undelete + + // BEGIN: com.azure.storage.blob.BlobClient.undelete#Duration + System.out.printf("Undelete completed with status %d%n", client.undelete(timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.undelete#Duration + } + + /** + * Code snippets for {@link BlobClient#acquireLease(String, int)} and + * {@link BlobClient#acquireLease(String, int, ModifiedAccessConditions, Duration)} + */ + public void acquireLease() { + // BEGIN: com.azure.storage.blob.BlobClient.acquireLease#String-int + System.out.printf("Lease ID is %s%n", client.acquireLease("proposedId", 60).value()); + // END: com.azure.storage.blob.BlobClient.acquireLease#String-int + + // BEGIN: com.azure.storage.blob.BlobClient.acquireLease#String-int-ModifiedAccessConditions-Duration + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifModifiedSince(OffsetDateTime.now().minusDays(3)); + + System.out.printf("Lease ID is %s%n", + client.acquireLease("proposedId", 60, modifiedAccessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.acquireLease#String-int-ModifiedAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#renewLease(String)} and + * {@link BlobClient#renewLease(String, ModifiedAccessConditions, Duration)} + */ + public void renewLease() { + // BEGIN: com.azure.storage.blob.BlobClient.renewLease#String + System.out.printf("Renewed lease ID is %s%n", client.renewLease(leaseId).value()); + // END: com.azure.storage.blob.BlobClient.renewLease#String + + // BEGIN: com.azure.storage.blob.BlobClient.renewLease#String-ModifiedAccessConditions-Duration + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + System.out.printf("Renewed lease ID is %s%n", + client.renewLease(leaseId, modifiedAccessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.renewLease#String-ModifiedAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#releaseLease(String)} and + * {@link BlobClient#releaseLease(String, ModifiedAccessConditions, Duration)} + */ + public void releaseLease() { + // BEGIN: com.azure.storage.blob.BlobClient.releaseLease#String + System.out.printf("Release lease completed with status %d%n", client.releaseLease(leaseId).statusCode()); + // END: com.azure.storage.blob.BlobClient.releaseLease#String + + // BEGIN: com.azure.storage.blob.BlobClient.releaseLease#String-ModifiedAccessConditions-Duration + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + System.out.printf("Release lease completed with status %d%n", + client.releaseLease(leaseId, modifiedAccessConditions, timeout).statusCode()); + // END: com.azure.storage.blob.BlobClient.releaseLease#String-ModifiedAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#breakLease()} and + * {@link BlobClient#breakLease(Integer, ModifiedAccessConditions, Duration)} + */ + public void breakLease() { + // BEGIN: com.azure.storage.blob.BlobClient.breakLease + System.out.printf("The broken lease has %d seconds remaining on the lease", client.breakLease().value()); + // END: com.azure.storage.blob.BlobClient.breakLease + + // BEGIN: com.azure.storage.blob.BlobClient.breakLease#Integer-ModifiedAccessConditions-Duration + Integer retainLeaseInSeconds = 5; + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + System.out.printf("The broken lease has %d seconds remaining on the lease", + client.breakLease(retainLeaseInSeconds, modifiedAccessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.breakLease#Integer-ModifiedAccessConditions-Duration + } + + /** + * Code snippets for {@link BlobClient#changeLease(String, String)} and + * {@link BlobClient#changeLease(String, String, ModifiedAccessConditions, Duration)} + */ + public void changeLease() { + // BEGIN: com.azure.storage.blob.BlobClient.changeLease#String-String + System.out.printf("Changed lease ID is %s%n", client.changeLease(leaseId, "proposedId").value()); + // END: com.azure.storage.blob.BlobClient.changeLease#String-String + + // BEGIN: com.azure.storage.blob.BlobClient.changeLease#String-String-ModifiedAccessConditions-Duration + ModifiedAccessConditions modifiedAccessConditions = new ModifiedAccessConditions() + .ifUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + System.out.printf("Changed lease ID is %s%n", + client.changeLease(leaseId, "proposedId", modifiedAccessConditions, timeout).value()); + // END: com.azure.storage.blob.BlobClient.changeLease#String-String-ModifiedAccessConditions-Duration + } + + /** + * Code snippet for {@link BlobClient#getAccountInfo()} + */ + public void getAccountInfo() { + // BEGIN: com.azure.storage.blob.BlobClient.getAccountInfo + StorageAccountInfo accountInfo = client.getAccountInfo().value(); + System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.accountKind(), accountInfo.skuName()); + // END: com.azure.storage.blob.BlobClient.getAccountInfo + } + + /** + * Code snippet for {@link BlobClient#getAccountInfo(Duration)} + */ + public void getAccountInfoWithTimeout() { + // BEGIN: com.azure.storage.blob.BlobClient.getAccountInfo#Duration + StorageAccountInfo accountInfo = client.getAccountInfo(timeout).value(); + System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.accountKind(), accountInfo.skuName()); + // END: com.azure.storage.blob.BlobClient.getAccountInfo#Duration + } +} diff --git a/storage/client/blob/src/samples/java/FileTransferExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java similarity index 93% rename from storage/client/blob/src/samples/java/FileTransferExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java index cfd281c1e3f8..33886cd10750 100644 --- a/storage/client/blob/src/samples/java/FileTransferExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/FileTransferExample.java @@ -1,10 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.storage.blob.BlockBlobClient; -import com.azure.storage.blob.ContainerClient; -import com.azure.storage.blob.StorageClient; -import com.azure.storage.blob.StorageClientBuilder; +package com.azure.storage.blob; + import com.azure.storage.common.credentials.SharedKeyCredential; import java.io.File; @@ -52,10 +50,10 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept String endPoint = String.format(Locale.ROOT, "https://%s.blob.core.windows.net", accountName); /* - * Create a StorageClient object that wraps the service endpoint, credential and a request pipeline. + * Create a BlobServiceClient object that wraps the service endpoint, credential and a request pipeline. * Now you can use the storageClient to perform various container and blob operations. */ - StorageClient storageClient = new StorageClientBuilder().endpoint(endPoint).credential(credential).buildClient(); + BlobServiceClient storageClient = new BlobServiceClientBuilder().endpoint(endPoint).credential(credential).buildClient(); /* diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java new file mode 100644 index 000000000000..febf2861cad9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob; + +import java.net.MalformedURLException; +import java.net.URL; + +final class JavaDocCodeSnippetsHelpers { + static ContainerAsyncClient getContainerAsyncClient() { + return new ContainerClientBuilder().buildAsyncClient(); + } + + static BlobAsyncClient getBlobAsyncClient(String blobName) { + return getContainerAsyncClient().getBlobAsyncClient(blobName); + } + + static BlobClient getBlobClient(String blobName) { + return new BlobClient(getBlobAsyncClient(blobName)); + } + + static URL generateURL(String urlString) { + try { + return new URL(urlString); + } catch (MalformedURLException ex) { + throw new RuntimeException(ex); + } + } +} diff --git a/storage/client/blob/src/samples/java/ListContainersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java similarity index 84% rename from storage/client/blob/src/samples/java/ListContainersExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java index ab8c9b3709bc..5588ef64241c 100644 --- a/storage/client/blob/src/samples/java/ListContainersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/ListContainersExample.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.storage.blob.StorageClient; -import com.azure.storage.blob.StorageClientBuilder; +package com.azure.storage.blob; + import com.azure.storage.common.credentials.SharedKeyCredential; import java.util.Locale; @@ -32,9 +32,9 @@ public static void main(String[] args) { String endpoint = String.format(Locale.ROOT, "https://%s.blob.core.windows.net", accountName); /* - * Create a StorageClient object that wraps the service endpoint, credential and a request pipeline. + * Create a BlobServiceClient object that wraps the service endpoint, credential and a request pipeline. */ - StorageClient storageClient = new StorageClientBuilder().endpoint(endpoint).credential(credential).buildClient(); + BlobServiceClient storageClient = new BlobServiceClientBuilder().endpoint(endpoint).credential(credential).buildClient(); /* * Create 3 different containers from the storageClient. diff --git a/storage/client/blob/src/samples/java/SampleHelper.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SampleHelper.java similarity index 94% rename from storage/client/blob/src/samples/java/SampleHelper.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SampleHelper.java index d841413f06bc..f72655d856bd 100644 --- a/storage/client/blob/src/samples/java/SampleHelper.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SampleHelper.java @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +package com.azure.storage.blob; + import com.azure.core.util.configuration.ConfigurationManager; /** diff --git a/storage/client/blob/src/samples/java/SetMetadataAndHTTPHeadersExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java similarity index 87% rename from storage/client/blob/src/samples/java/SetMetadataAndHTTPHeadersExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java index 6b475499eab2..591e78141f70 100644 --- a/storage/client/blob/src/samples/java/SetMetadataAndHTTPHeadersExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java @@ -1,10 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import com.azure.storage.blob.BlockBlobClient; -import com.azure.storage.blob.ContainerClient; -import com.azure.storage.blob.StorageClient; -import com.azure.storage.blob.StorageClientBuilder; +package com.azure.storage.blob; + import com.azure.storage.blob.models.BlobHTTPHeaders; import com.azure.storage.blob.models.Metadata; import com.azure.storage.common.credentials.SharedKeyCredential; @@ -42,9 +40,9 @@ public static void main(String[] args) throws IOException { String endpoint = String.format(Locale.ROOT, "https://%s.blob.core.windows.net", accountName); /* - * Create a StorageClient object that wraps the service endpoint, credential and a request pipeline. + * Create a BlobServiceClient object that wraps the service endpoint, credential and a request pipeline. */ - StorageClient storageClient = new StorageClientBuilder().endpoint(endpoint).credential(credential).buildClient(); + BlobServiceClient storageClient = new BlobServiceClientBuilder().endpoint(endpoint).credential(credential).buildClient(); /* * Create a container client from storageClient. diff --git a/storage/client/blob/src/samples/java/StorageErrorHandlingExample.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java similarity index 94% rename from storage/client/blob/src/samples/java/StorageErrorHandlingExample.java rename to sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java index 50d4e81d600c..3a84d7026f7b 100644 --- a/storage/client/blob/src/samples/java/StorageErrorHandlingExample.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +package com.azure.storage.blob; + import com.azure.core.http.HttpResponse; -import com.azure.storage.blob.ContainerClient; -import com.azure.storage.blob.ContainerClientBuilder; -import com.azure.storage.blob.StorageException; import com.azure.storage.blob.models.StorageErrorCode; /** diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy similarity index 97% rename from storage/client/blob/src/test/java/com/azure/storage/blob/APISpec.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index 8e431ff054fd..abac9b167e18 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -98,16 +98,16 @@ class APISpec extends Specification { /* URLs to various kinds of accounts. */ - StorageClient primaryServiceURL + BlobServiceClient primaryServiceURL @Shared - static StorageClient alternateServiceURL + static BlobServiceClient alternateServiceURL @Shared - static StorageClient blobStorageServiceURL + static BlobServiceClient blobStorageServiceURL @Shared - static StorageClient premiumServiceURL + static BlobServiceClient premiumServiceURL /* Constants for testing that the context parameter is properly passed to the pipeline. @@ -195,10 +195,10 @@ class APISpec extends Specification { } } - static StorageClient getGenericServiceURL(SharedKeyCredential creds) { + static BlobServiceClient getGenericServiceURL(SharedKeyCredential creds) { // TODO: logging? - return new StorageClientBuilder() + return new BlobServiceClientBuilder() .endpoint("https://" + creds.accountName() + ".blob.core.windows.net") .httpClient(getHttpClient()) .httpLogDetailLevel(HttpLogDetailLevel.BODY_AND_HEADERS) @@ -207,7 +207,7 @@ class APISpec extends Specification { } static void cleanupContainers() throws MalformedURLException { - StorageClient serviceURL = new StorageClientBuilder() + BlobServiceClient serviceURL = new BlobServiceClientBuilder() .endpoint("http://" + primaryCreds.accountName() + ".blob.core.windows.net") .credential(primaryCreds) .buildClient() @@ -556,7 +556,7 @@ class APISpec extends Specification { } def getOAuthServiceURL() { - return new StorageClientBuilder() + return new BlobServiceClientBuilder() .endpoint(String.format("https://%s.blob.core.windows.net/", primaryCreds.accountName())) .credential(new EnvironmentCredential()) // AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET .buildClient() diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/AadLoginTest.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AadLoginTest.java similarity index 89% rename from storage/client/blob/src/test/java/com/azure/storage/blob/AadLoginTest.java rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AadLoginTest.java index 3c2ee324d196..b284e65beb8c 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/AadLoginTest.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AadLoginTest.java @@ -11,11 +11,11 @@ public class AadLoginTest { private static final Random RANDOM = new Random(); - private static StorageClient storageClient; + private static BlobServiceClient storageClient; @BeforeClass public static void setup() { - storageClient = new StorageClientBuilder() + storageClient = new BlobServiceClientBuilder() .endpoint("https://" + System.getenv("ACCOUNT_NAME") + ".blob.core.windows.net") .credential(new EnvironmentCredential()) // .httpClient(HttpClient.createDefault().proxy(() -> new ProxyOptions(Type.HTTP, new InetSocketAddress("localhost", 8888)))) diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy similarity index 100% rename from storage/client/blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AppendBlobAPITest.groovy diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy similarity index 99% rename from storage/client/blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index d0be4d532642..5c1bd1178736 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -138,7 +138,7 @@ class BlobAPITest extends APISpec { when: def outStream = new ByteArrayOutputStream() - bu.download(outStream, null, range, null, false, null) + bu.download(outStream, range, null, null, false, null) String bodyStr = outStream.toString() then: @@ -208,7 +208,7 @@ class BlobAPITest extends APISpec { def "Download md5"() { when: - VoidResponse response = bu.download(new ByteArrayOutputStream(), null, new BlobRange(0 ,3), null, true, null) + VoidResponse response = bu.download(new ByteArrayOutputStream(), new BlobRange(0 ,3), null, null, true, null) byte[] contentMD5 = response.headers().value("content-md5").getBytes() then: @@ -1872,7 +1872,7 @@ class BlobAPITest extends APISpec { def "Get account info error"() { when: - StorageClient serviceURL = new StorageClientBuilder() + BlobServiceClient serviceURL = new BlobServiceClientBuilder() .endpoint(primaryServiceURL.getAccountUrl().toString()) .buildClient() serviceURL.getContainerClient(generateContainerName()).getBlobClient(generateBlobName()) diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java similarity index 97% rename from storage/client/blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java index 7ebc5e8487cf..e7955c9b7be9 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobOutputStreamTest.java @@ -17,12 +17,12 @@ public class BlobOutputStreamTest { private static final Random RANDOM = new Random(); - private static StorageClient storageClient; + private static BlobServiceClient storageClient; private static ContainerClient containerClient; @BeforeClass public static void setup() { - storageClient = new StorageClientBuilder() + storageClient = new BlobServiceClientBuilder() .endpoint("https://" + System.getenv("ACCOUNT_NAME") + ".blob.core.windows.net") .credential(new SharedKeyCredential(System.getenv("ACCOUNT_NAME"), System.getenv("ACCOUNT_KEY"))) // .httpClient(HttpClient.createDefault().proxy(() -> new ProxyOptions(Type.HTTP, new InetSocketAddress("localhost", 8888)))) diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy similarity index 100% rename from storage/client/blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobAPITest.groovy diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy similarity index 100% rename from storage/client/blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlockBlobInputOutputStreamTest.groovy diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy similarity index 99% rename from storage/client/blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 86da9838d53b..f82f1d4220eb 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -1624,7 +1624,7 @@ class ContainerAPITest extends APISpec { def "Get account info error"() { when: - StorageClient serviceURL = new StorageClientBuilder() + BlobServiceClient serviceURL = new BlobServiceClientBuilder() .endpoint(primaryServiceURL.getAccountUrl().toString()) .buildClient() diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/LargeFileTest.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LargeFileTest.java similarity index 95% rename from storage/client/blob/src/test/java/com/azure/storage/blob/LargeFileTest.java rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LargeFileTest.java index a692d6d4c3c3..8bff57d55951 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/LargeFileTest.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/LargeFileTest.java @@ -13,12 +13,12 @@ public class LargeFileTest { private static final Random RANDOM = new Random(); private static final String FILE_PATH = "C:\\Users\\jianghlu\\10g.dat"; - private static StorageClient storageClient; + private static BlobServiceClient storageClient; private static ContainerClient containerClient; //@BeforeClass public static void setup() { - storageClient = new StorageClientBuilder() + storageClient = new BlobServiceClientBuilder() .credential(new SharedKeyCredential(System.getenv("ACCOUNT_NAME"), System.getenv("ACCOUNT_KEY"))) .endpoint("https://" + System.getenv("ACCOUNT_NAME") + ".blob.core.windows.net") // .httpClient(HttpClient.createDefault().proxy(() -> new ProxyOptions(Type.HTTP, new InetSocketAddress("localhost", 8888)))) diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy similarity index 100% rename from storage/client/blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/PageBlobAPITest.groovy diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy similarity index 99% rename from storage/client/blob/src/test/java/com/azure/storage/blob/SASTest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index 2824ac1d3067..705453b54968 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -482,7 +482,7 @@ class SASTest extends APISpec { when: def sas = primaryServiceURL.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def scBuilder = new StorageClientBuilder() + def scBuilder = new BlobServiceClientBuilder() scBuilder.endpoint(primaryServiceURL.getAccountUrl().toString()) .httpClient(getHttpClient()) .credential(SASTokenCredential.fromSASTokenString(sas)) @@ -509,7 +509,7 @@ class SASTest extends APISpec { when: def sas = primaryServiceURL.generateAccountSAS(service, resourceType, permissions, expiryTime, null, null, null, null) - def scBuilder = new StorageClientBuilder() + def scBuilder = new BlobServiceClientBuilder() scBuilder.endpoint(primaryServiceURL.getAccountUrl().toString()) .httpClient(getHttpClient()) .credential(SASTokenCredential.fromSASTokenString(sas)) diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/Sample.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java similarity index 95% rename from storage/client/blob/src/test/java/com/azure/storage/blob/Sample.java rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java index f6d19d6b8416..d5955365880a 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/Sample.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/Sample.java @@ -30,7 +30,7 @@ public class Sample { //@Test public void sample() throws IOException { // get service client - StorageClient serviceClient = new StorageClientBuilder().endpoint(ACCOUNT_ENDPOINT) + BlobServiceClient serviceClient = new BlobServiceClientBuilder().endpoint(ACCOUNT_ENDPOINT) .credential(new SharedKeyCredential(ACCOUNT_NAME, ACCOUNT_KEY)) .httpClient(HttpClient.createDefault()/*.proxy(() -> new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888)))*/) .buildClient(); @@ -82,7 +82,7 @@ public void sample() throws IOException { //@Test public void asyncSample() throws IOException { // get service client - StorageAsyncClient serviceClient = new StorageClientBuilder().endpoint(ACCOUNT_ENDPOINT) + BlobServiceAsyncClient serviceClient = new BlobServiceClientBuilder().endpoint(ACCOUNT_ENDPOINT) .credential(new SharedKeyCredential(ACCOUNT_NAME, ACCOUNT_KEY)) .httpClient(HttpClient.createDefault()/*.proxy(() -> new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888)))*/) .buildAsyncClient(); @@ -161,7 +161,7 @@ public void uploadDownloadFromFile() throws IOException { fstream.close(); // get service client - StorageClient serviceClient = new StorageClientBuilder().endpoint(ACCOUNT_ENDPOINT) + BlobServiceClient serviceClient = new BlobServiceClientBuilder().endpoint(ACCOUNT_ENDPOINT) .credential(new SharedKeyCredential(ACCOUNT_NAME, ACCOUNT_KEY)) .httpClient(HttpClient.createDefault()/*.proxy(() -> new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888)))*/) .buildClient(); @@ -191,7 +191,7 @@ public void uploadDownloadFromFileAsync() throws IOException { fstream.close(); // get service client - StorageAsyncClient serviceClient = new StorageClientBuilder().endpoint(ACCOUNT_ENDPOINT) + BlobServiceAsyncClient serviceClient = new BlobServiceClientBuilder().endpoint(ACCOUNT_ENDPOINT) .credential(new SharedKeyCredential(ACCOUNT_NAME, ACCOUNT_KEY)) .httpClient(HttpClient.createDefault()/*.proxy(() -> new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888)))*/) .buildAsyncClient(); diff --git a/storage/client/blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy similarity index 97% rename from storage/client/blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy rename to sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy index d6e8861b4739..830dd34c2203 100644 --- a/storage/client/blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy @@ -234,7 +234,7 @@ class ServiceAPITest extends APISpec { def "Set props error"() { when: - new StorageClientBuilder() + new BlobServiceClientBuilder() .endpoint("https://error.blob.core.windows.net") .credential(primaryCreds) .buildClient() @@ -251,7 +251,7 @@ class ServiceAPITest extends APISpec { def "Get props error"() { when: - new StorageClientBuilder() + new BlobServiceClientBuilder() .endpoint("https://error.blob.core.windows.net") .credential(primaryCreds) .buildClient() @@ -306,7 +306,7 @@ class ServiceAPITest extends APISpec { def "Get stats"() { setup: String secondaryEndpoint = String.format("https://%s-secondary.blob.core.windows.net", primaryCreds.accountName()) - StorageClient serviceClient = new StorageClientBuilder().endpoint(secondaryEndpoint) + BlobServiceClient serviceClient = new BlobServiceClientBuilder().endpoint(secondaryEndpoint) .credential(primaryCreds).buildClient() Response response = serviceClient.getStatistics() @@ -321,7 +321,7 @@ class ServiceAPITest extends APISpec { def "Get stats min"() { setup: String secondaryEndpoint = String.format("https://%s-secondary.blob.core.windows.net", primaryCreds.accountName()) - StorageClient serviceClient = new StorageClientBuilder().endpoint(secondaryEndpoint) + BlobServiceClient serviceClient = new BlobServiceClientBuilder().endpoint(secondaryEndpoint) .credential(primaryCreds).buildClient() expect: serviceClient.getStatistics().statusCode() == 200 @@ -354,7 +354,7 @@ class ServiceAPITest extends APISpec { def "Get account info error"() { when: - StorageClient serviceURL = new StorageClientBuilder() + BlobServiceClient serviceURL = new BlobServiceClientBuilder() .endpoint(primaryServiceURL.getAccountUrl().toString()) .buildClient() serviceURL.getAccountInfo() @@ -368,7 +368,7 @@ class ServiceAPITest extends APISpec { def "Invalid account name"() { setup: URL badURL = new URL("http://fake.blobfake.core.windows.net") - StorageClient client = new StorageClientBuilder() + BlobServiceClient client = new BlobServiceClientBuilder() .endpoint(badURL.toString()) .credential(primaryCreds) .retryOptions(new RequestRetryOptions(null, 2, null, null, null, null)) diff --git a/storage/client/blob/swagger/blob.json b/sdk/storage/azure-storage-blob/swagger/blob.json similarity index 99% rename from storage/client/blob/swagger/blob.json rename to sdk/storage/azure-storage-blob/swagger/blob.json index 4a89d47458cc..19d7f37b25a6 100644 --- a/storage/client/blob/swagger/blob.json +++ b/sdk/storage/azure-storage-blob/swagger/blob.json @@ -2405,15 +2405,6 @@ "format": "file" } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -2706,15 +2697,6 @@ } } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -5077,15 +5059,6 @@ } } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -5791,15 +5764,6 @@ } } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -5930,15 +5894,6 @@ "$ref": "#/definitions/PageList" } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -6056,15 +6011,6 @@ "$ref": "#/definitions/PageList" } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -6683,15 +6629,6 @@ } } }, - "304": { - "description": "The condition specified using HTTP conditional header(s) is not met.", - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } - }, "default": { "description": "Failure", "headers": { @@ -6939,7 +6876,13 @@ "$ref": "#/definitions/BlobProperties" }, "Metadata": { - "$ref": "#/definitions/BlobMetadata" + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "IsPrefix": { + "type": "boolean" } } }, @@ -7767,7 +7710,7 @@ }, "xml": { "wrapped": true, - "name": "SignedIdentifiers" + "name": "SignedIdentifier" } }, "StaticWebsite": { @@ -7864,7 +7807,7 @@ "pattern": "^[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*(?:\\.[a-zA-Z0-9]+){0,1}$", "minLength": 1, "maxLength": 1024, - "x-ms-parameter-location": "client", + "x-ms-parameter-location": "method", "description": "The blob name." }, "BlobCacheControl": { @@ -8119,7 +8062,7 @@ "in": "path", "required": true, "type": "string", - "x-ms-parameter-location": "client", + "x-ms-parameter-location": "method", "description": "The container name." }, "ContentCrc64": { diff --git a/storage/client/file/README.md b/sdk/storage/azure-storage-file/README.md similarity index 99% rename from storage/client/file/README.md rename to sdk/storage/azure-storage-file/README.md index db523e4d3e44..eae034c3a692 100644 --- a/storage/client/file/README.md +++ b/sdk/storage/azure-storage-file/README.md @@ -22,7 +22,7 @@ Shares provide a way to organize sets of files and also can be mounted as an SMB com.azure azure-storage-file - 12.0.0-preview.1 + 12.0.0-preview.2 ``` diff --git a/storage/client/file/pom.xml b/sdk/storage/azure-storage-file/pom.xml similarity index 94% rename from storage/client/file/pom.xml rename to sdk/storage/azure-storage-file/pom.xml index 5355d4211040..cd9e8d878c9a 100644 --- a/storage/client/file/pom.xml +++ b/sdk/storage/azure-storage-file/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-file - 12.0.0-preview.1 + 12.0.0-preview.2 azure-storage-file https://github.com/Azure/azure-sdk-for-java @@ -35,7 +35,7 @@ com.azure azure-core - 1.0.0-preview.2 + 1.0.0-preview.3 + + 4.0.0 + com.azure + azure-storage-service + pom + 1.0.0 + + microsoft-azure-storage-blob + ../core + azure-storage-blob + azure-storage-file + azure-storage-queue + + diff --git a/storage/client/tests.yml b/sdk/storage/tests.yml similarity index 80% rename from storage/client/tests.yml rename to sdk/storage/tests.yml index 5e0fa24fa24b..846f46380ee6 100644 --- a/storage/client/tests.yml +++ b/sdk/storage/tests.yml @@ -1,11 +1,9 @@ trigger: none jobs: - # When migrating change path to ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml - - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests-pre-sdk.yml + - template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml parameters: - # When migrating use ServiceDirectory - PomFilePath: './storage/client/pom.xml' + ServiceDirectory: storage EnvVars: AZURE_TEST_MODE: RECORD MICROSOFT_AD_TENANT_ID: $(microsoft-active-directory-tenant-id) diff --git a/storage/client/file/src/test/resources/session-records/abortCopy.json b/storage/client/file/src/test/resources/session-records/abortCopy.json deleted file mode 100644 index 44f4caf81358..000000000000 --- a/storage/client/file/src/test/resources/session-records/abortCopy.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ "file10519411" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/getFileClientFromDirClient.json b/storage/client/file/src/test/resources/session-records/getFileClientFromDirClient.json deleted file mode 100644 index 8fa3f19ff9cd..000000000000 --- a/storage/client/file/src/test/resources/session-records/getFileClientFromDirClient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ "directory877236", "96d7c3acc68d4acc" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/getHandlesFromDirClient.json b/storage/client/file/src/test/resources/session-records/getHandlesFromDirClient.json deleted file mode 100644 index 0b31e3f9121c..000000000000 --- a/storage/client/file/src/test/resources/session-records/getHandlesFromDirClient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ "directory12788e" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/getSubDirectoryClient.json b/storage/client/file/src/test/resources/session-records/getSubDirectoryClient.json deleted file mode 100644 index 786a8d1614b5..000000000000 --- a/storage/client/file/src/test/resources/session-records/getSubDirectoryClient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ "directory092514" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listFilesAndDirectoriesFromDirClient.json b/storage/client/file/src/test/resources/session-records/listFilesAndDirectoriesFromDirClient.json deleted file mode 100644 index 8102f80f00dd..000000000000 --- a/storage/client/file/src/test/resources/session-records/listFilesAndDirectoriesFromDirClient.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397?restype=directory", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB5D8325F\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ece-001a-006b-2475-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:10 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013970?restype=directory", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB5E04A24\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ecf-001a-006b-2575-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:10 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fsamelayer02223a0", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB5E83ACF\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed0-001a-006b-2675-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:10 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013970%2fnextlayer57757b0", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB5F13D27\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed1-001a-006b-2775-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013971?restype=directory", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB5F92DCE\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed2-001a-006b-2875-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fsamelayer02223a01", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB6011E86\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed3-001a-006b-2975-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013971%2fnextlayer57757b01", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB608E814\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed4-001a-006b-2a75-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013972?restype=directory", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB610B1B3\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed5-001a-006b-2b75-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fsamelayer02223a012", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB618F08D\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed6-001a-006b-2c75-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397%2fdirectory6013972%2fnextlayer57757b012", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CB620BA31\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:42:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781ed7-001a-006b-2d75-4192c4000000", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net/dirsharename/directory601397?restype=directory&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781ed8-001a-006b-2e75-4192c4000000", - "Body" : "directory6013970directory6013971directory6013972samelayer02223a01024samelayer02223a011024samelayer02223a0121024", - "Date" : "Tue, 23 Jul 2019 16:42:11 GMT", - "Content-Type" : "application/xml" - } - } ], - "variables" : [ "directory601397", "samelayer02223a", "nextlayer57757b" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listShares.json b/storage/client/file/src/test/resources/session-records/listShares.json deleted file mode 100644 index 9b4198a90038..000000000000 --- a/storage/client/file/src/test/resources/session-records/listShares.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share334220300?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEDF8BA1A\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f99-001a-006b-0475-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share334220301?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE0083B4\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f9c-001a-006b-0675-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share334220302?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE084D4E\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f9f-001a-006b-0775-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share33422030&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fa2-001a-006b-0875-4192c4000000", - "Body" : "share33422030share334220300Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEDF8BA1A\"2share334220301Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEE0083B4\"2share334220302Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEE084D4E\"2", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share33422030&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fa3-001a-006b-0975-4192c4000000", - "Body" : "share33422030share334220300Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEDF8BA1A\"2share334220301Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEE0083B4\"2share334220302Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CEE084D4E\"2", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share334220300?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fa4-001a-006b-0a75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share334220301?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fa5-001a-006b-0b75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share334220302?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fa6-001a-006b-0c75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - } ], - "variables" : [ "share33422030" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadata.json b/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadata.json deleted file mode 100644 index 74e4401568be..000000000000 --- a/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadata.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share116742420?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEEFF5D8E\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fc4-001a-006b-2375-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share116742421?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEF077557\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fc6-001a-006b-2475-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share116742422?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEF0F3EF5\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fc8-001a-006b-2575-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share11674242&include=metadata&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fca-001a-006b-2675-4192c4000000", - "Body" : "share11674242share116742420Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEFF5D8E\"2metadatashare116742421Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEF077557\"2share116742422Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEF0F3EF5\"2metadata", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share11674242&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fcb-001a-006b-2775-4192c4000000", - "Body" : "share11674242share116742420Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEFF5D8E\"2share116742421Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEF077557\"2share116742422Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEF0F3EF5\"2", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share116742420?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fcc-001a-006b-2875-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share116742421?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fcd-001a-006b-2975-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share116742422?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fce-001a-006b-2a75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - } ], - "variables" : [ "share11674242" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadataAndSnapshots.json b/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadataAndSnapshots.json deleted file mode 100644 index fc52365263ae..000000000000 --- a/storage/client/file/src/test/resources/session-records/listSharesIncludeMetadataAndSnapshots.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share112342ce0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CED6BA295\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f84-001a-006b-7375-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share112342ce0?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "x-ms-snapshot" : "2019-07-23T16:43:44.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CED6BA295\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f86-001a-006b-7475-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share112342ce1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CED7C4768\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f87-001a-006b-7575-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share112342ce2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CED8745EA\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f89-001a-006b-7675-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share112342ce2?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "x-ms-snapshot" : "2019-07-23T16:43:45.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CED8745EA\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f8b-001a-006b-7775-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share112342ce&include=metadata%2csnapshots&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781f8c-001a-006b-7875-4192c4000000", - "Body" : "share112342ceshare112342ce02019-07-23T16:43:44.0000000ZTue, 23 Jul 2019 16:43:44 GMT\"0x8D70F8CED6BA295\"2metadatashare112342ce0Tue, 23 Jul 2019 16:43:44 GMT\"0x8D70F8CED6BA295\"2metadatashare112342ce1Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CED7C4768\"2share112342ce22019-07-23T16:43:45.0000000ZTue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CED8745EA\"2metadatashare112342ce2Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CED8745EA\"2metadata", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share112342ce&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781f8d-001a-006b-7975-4192c4000000", - "Body" : "share112342ceshare112342ce0Tue, 23 Jul 2019 16:43:44 GMT\"0x8D70F8CED6BA295\"2share112342ce1Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CED7C4768\"2share112342ce2Tue, 23 Jul 2019 16:43:45 GMT\"0x8D70F8CED8745EA\"2", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share112342ce0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareHasSnapshots", - "retry-after" : "0", - "Content-Length" : "250", - "StatusCode" : "409", - "x-ms-request-id" : "a4781f8e-001a-006b-7a75-4192c4000000", - "Body" : "ShareHasSnapshotsThe share has snapshots and the operation requires no snapshots.\nRequestId:a4781f8e-001a-006b-7a75-4192c4000000\nTime:2019-07-23T16:43:45.3519776Z", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share112342ce1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781f8f-001a-006b-7b75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share112342ce2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareHasSnapshots", - "retry-after" : "0", - "Content-Length" : "250", - "StatusCode" : "409", - "x-ms-request-id" : "a4781f90-001a-006b-7c75-4192c4000000", - "Body" : "ShareHasSnapshotsThe share has snapshots and the operation requires no snapshots.\nRequestId:a4781f90-001a-006b-7c75-4192c4000000\nTime:2019-07-23T16:43:45.4540500Z", - "Date" : "Tue, 23 Jul 2019 16:43:44 GMT", - "Content-Type" : "application/xml" - } - } ], - "variables" : [ "share112342ce" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listSharesIncludeSnapshots.json b/storage/client/file/src/test/resources/session-records/listSharesIncludeSnapshots.json deleted file mode 100644 index 9274ad655d14..000000000000 --- a/storage/client/file/src/test/resources/session-records/listSharesIncludeSnapshots.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share305309dc0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE49A7FE\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781faa-001a-006b-0f75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share305309dc0?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "x-ms-snapshot" : "2019-07-23T16:43:46.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE49A7FE\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fac-001a-006b-1075-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share305309dc1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE5A4CDF\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fad-001a-006b-1175-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share305309dc2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE6CC6C8\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781faf-001a-006b-1275-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share305309dc2?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "x-ms-snapshot" : "2019-07-23T16:43:46.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEE6CC6C8\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fb1-001a-006b-1375-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share305309dc&include=snapshots&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fb2-001a-006b-1475-4192c4000000", - "Body" : "share305309dcshare305309dc02019-07-23T16:43:46.0000000ZTue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE49A7FE\"2share305309dc0Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE49A7FE\"2share305309dc1Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE5A4CDF\"2share305309dc22019-07-23T16:43:46.0000000ZTue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE6CC6C8\"2share305309dc2Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE6CC6C8\"2", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share305309dc&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fb3-001a-006b-1575-4192c4000000", - "Body" : "share305309dcshare305309dc0Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE49A7FE\"2share305309dc1Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE5A4CDF\"2share305309dc2Tue, 23 Jul 2019 16:43:46 GMT\"0x8D70F8CEE6CC6C8\"2", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share305309dc0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareHasSnapshots", - "retry-after" : "0", - "Content-Length" : "250", - "StatusCode" : "409", - "x-ms-request-id" : "a4781fb4-001a-006b-1675-4192c4000000", - "Body" : "ShareHasSnapshotsThe share has snapshots and the operation requires no snapshots.\nRequestId:a4781fb4-001a-006b-1675-4192c4000000\nTime:2019-07-23T16:43:46.8250278Z", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share305309dc1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fb5-001a-006b-1775-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share305309dc2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareHasSnapshots", - "retry-after" : "0", - "Content-Length" : "250", - "StatusCode" : "409", - "x-ms-request-id" : "a4781fb6-001a-006b-1875-4192c4000000", - "Body" : "ShareHasSnapshotsThe share has snapshots and the operation requires no snapshots.\nRequestId:a4781fb6-001a-006b-1875-4192c4000000\nTime:2019-07-23T16:43:46.9331058Z", - "Date" : "Tue, 23 Jul 2019 16:43:45 GMT", - "Content-Type" : "application/xml" - } - } ], - "variables" : [ "share305309dc" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listSharesWithLimit.json b/storage/client/file/src/test/resources/session-records/listSharesWithLimit.json deleted file mode 100644 index ba78ebd77bda..000000000000 --- a/storage/client/file/src/test/resources/session-records/listSharesWithLimit.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share058285ff0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CECCDBF15\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f6c-001a-006b-6075-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:42 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share058285ff1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CECD62507\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f6e-001a-006b-6175-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:42 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share058285ff2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CECDDC795\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781f70-001a-006b-6275-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share058285ff&maxresults=2&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781f72-001a-006b-6375-4192c4000000", - "Body" : "share058285ff2share058285ff0Tue, 23 Jul 2019 16:43:43 GMT\"0x8D70F8CECCDBF15\"2share058285ff1Tue, 23 Jul 2019 16:43:43 GMT\"0x8D70F8CECD62507\"2/sima/share058285ff2", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share058285ff&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781f73-001a-006b-6475-4192c4000000", - "Body" : "share058285ffshare058285ff0Tue, 23 Jul 2019 16:43:43 GMT\"0x8D70F8CECCDBF15\"2share058285ff1Tue, 23 Jul 2019 16:43:43 GMT\"0x8D70F8CECD62507\"2share058285ff2Tue, 23 Jul 2019 16:43:44 GMT\"0x8D70F8CECDDC795\"2", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share058285ff0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781f74-001a-006b-6575-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share058285ff1?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781f75-001a-006b-6675-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share058285ff2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781f76-001a-006b-6775-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:43 GMT" - } - } ], - "variables" : [ "share058285ff" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/listSharesWithPrefix.json b/storage/client/file/src/test/resources/session-records/listSharesWithPrefix.json deleted file mode 100644 index eec9f6affa44..000000000000 --- a/storage/client/file/src/test/resources/session-records/listSharesWithPrefix.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share98599009prefix0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEEA9B3D7\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fb7-001a-006b-1975-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share985990091?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEEB48B44\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fb9-001a-006b-1a75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.file.core.windows.net/share98599009prefix2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "\"0x8D70F8CEEBC7BF7\"", - "Last-Modified" : "Tue, 23 Jul 2019 16:43:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a4781fbb-001a-006b-1b75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share98599009prefix&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fbd-001a-006b-1c75-4192c4000000", - "Body" : "share98599009prefixshare98599009prefix0Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEA9B3D7\"2share98599009prefix2Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEBC7BF7\"2", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.file.core.windows.net?prefix=share98599009&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a4781fbe-001a-006b-1d75-4192c4000000", - "Body" : "share98599009share985990091Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEB48B44\"2share98599009prefix0Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEA9B3D7\"2share98599009prefix2Tue, 23 Jul 2019 16:43:47 GMT\"0x8D70F8CEEBC7BF7\"2", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share985990091?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fbf-001a-006b-1e75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share98599009prefix0?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fc0-001a-006b-1f75-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.file.core.windows.net/share98599009prefix2?restype=share", - "Headers" : { - "x-ms-version" : "2018-11-09", - "User-Agent" : "azsdk-java-azure-storage-file/12.0.0-preview.1 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-11-09", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a4781fc1-001a-006b-2075-4192c4000000", - "Date" : "Tue, 23 Jul 2019 16:43:46 GMT" - } - } ], - "variables" : [ "share98599009" ] -} \ No newline at end of file diff --git a/storage/client/file/src/test/resources/session-records/urlFromDirClient.json b/storage/client/file/src/test/resources/session-records/urlFromDirClient.json deleted file mode 100644 index 11fc90ded8ae..000000000000 --- a/storage/client/file/src/test/resources/session-records/urlFromDirClient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ "directory100251" ] -} \ No newline at end of file diff --git a/storage/client/pom.xml b/storage/client/pom.xml deleted file mode 100644 index 645574936759..000000000000 --- a/storage/client/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.0.0 - ../../pom.client.xml - - - com.azure - azure-storage - 12.0.0 - - Microsoft Azure client library for Storage - This package contains the Microsoft Azure Storage client library. - https://github.com/Azure/azure-sdk-for-java - - - - azure-java-build-docs - ${site.url}/site/${project.artifactId} - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - - com.azure - azure-core - 1.0.0-preview.1 - - - - - - - org.slf4j - slf4j-api - - - - com.azure - azure-core-test - 1.0.0-preview.1 - test - - - junit - junit - test - - - org.slf4j - slf4j-simple - test - - - io.projectreactor - reactor-test - test - - - com.microsoft.azure - adal4j - test - - - org.spockframework - spock-core - test - - - cglib - cglib-nodep - test - - - uk.org.lidalia - slf4j-test - test - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - false - false - - - - org.apache.maven.plugins - maven-javadoc-plugin - - false - false - - - - - com.github.spotbugs - spotbugs-maven-plugin - - false - - - - - diff --git a/storage/client/queue/src/test/resources/session-records/clearMessages.json b/storage/client/queue/src/test/resources/session-records/clearMessages.json deleted file mode 100644 index dab05b23fcfd..000000000000 --- a/storage/client/queue/src/test/resources/session-records/clearMessages.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue39460410", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222863-4003-0028-6775-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue39460410/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd2228a8-4003-0028-1b75-37b82d000000", - "Body" : "23ac390a-a15c-4036-b933-506b593e817aWed, 10 Jul 2019 23:18:01 GMTWed, 17 Jul 2019 23:18:01 GMTAgAAAAMAAAAAAAAAeGrWt3U31QE=Wed, 10 Jul 2019 23:18:01 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue39460410/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd2228d0-4003-0028-3a75-37b82d000000", - "Body" : "0820c842-8ea6-466f-801e-8fdb0240f573Wed, 10 Jul 2019 23:18:01 GMTWed, 17 Jul 2019 23:18:01 GMTAgAAAAMAAAAAAAAARoLet3U31QE=Wed, 10 Jul 2019 23:18:01 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue39460410/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd2228f8-4003-0028-5975-37b82d000000", - "Body" : "1a2b254b-4f28-4dba-8a56-5947173e08faWed, 10 Jul 2019 23:18:01 GMTWed, 17 Jul 2019 23:18:01 GMTAgAAAAMAAAAAAAAA5kvmt3U31QE=Wed, 10 Jul 2019 23:18:01 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue39460410?comp=metadata", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "Content-Length" : "0", - "x-ms-approximate-messages-count" : "3", - "StatusCode" : "200", - "x-ms-request-id" : "dd222917-4003-0028-7175-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue39460410/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd22292f-4003-0028-0775-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:00 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue39460410?comp=metadata", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "Content-Length" : "0", - "x-ms-approximate-messages-count" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd222940-4003-0028-1575-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue39460410/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd22295c-4003-0028-2975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue39460410", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222973-4003-0028-3e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - } ], - "variables" : [ "queue39460410" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/createQueue.json b/storage/client/queue/src/test/resources/session-records/createQueue.json deleted file mode 100644 index 51d4b6d64f5b..000000000000 --- a/storage/client/queue/src/test/resources/session-records/createQueue.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue09262a67", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d29065a-6003-009e-2f76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:47 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue09262a67/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290667-6003-009e-3b76-37b6d5000000", - "Body" : "94fd0809-1708-49c0-91ea-d4cf2141af7fWed, 10 Jul 2019 23:24:47 GMTWed, 17 Jul 2019 23:24:47 GMTAgAAAAMAAAAAAAAAREDwqXY31QE=Wed, 10 Jul 2019 23:24:47 GMT", - "Date" : "Wed, 10 Jul 2019 23:24:47 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue09262a67&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d29067f-6003-009e-5376-37b6d5000000", - "Body" : "queue09262a67queue09262a67", - "Date" : "Wed, 10 Jul 2019 23:24:47 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue09262a67/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290694-6003-009e-6676-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:47 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue09262a67", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2906a1-6003-009e-7376-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:47 GMT" - } - } ], - "variables" : [ "queue09262a67" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/createQueueTwiceSameMetadata.json b/storage/client/queue/src/test/resources/session-records/createQueueTwiceSameMetadata.json deleted file mode 100644 index 5f637cb224b8..000000000000 --- a/storage/client/queue/src/test/resources/session-records/createQueueTwiceSameMetadata.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d29094b-6003-009e-0a76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d29096a-6003-009e-2176-37b6d5000000", - "Body" : "e59cbb06-dc9a-4fd8-89c9-a62bec05127eWed, 10 Jul 2019 23:24:49 GMTWed, 17 Jul 2019 23:24:49 GMTAgAAAAMAAAAAAAAAh80Wq3Y31QE=Wed, 10 Jul 2019 23:24:49 GMT", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290979-6003-009e-2d76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d/messages?peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d29099f-6003-009e-4b76-37b6d5000000", - "Body" : "e59cbb06-dc9a-4fd8-89c9-a62bec05127eWed, 10 Jul 2019 23:24:49 GMTWed, 17 Jul 2019 23:24:49 GMT0Testing service client creating the same queue twice does not modify the queue", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue3315117d&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d2909d4-6003-009e-7a76-37b6d5000000", - "Body" : "queue3315117dqueue3315117d", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2909eb-6003-009e-0e76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue3315117d", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2909f9-6003-009e-1b76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - } ], - "variables" : [ "queue3315117d" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/deleteMessage.json b/storage/client/queue/src/test/resources/session-records/deleteMessage.json deleted file mode 100644 index 4682bf4a1a13..000000000000 --- a/storage/client/queue/src/test/resources/session-records/deleteMessage.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd226162-4003-0028-1e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd226172-4003-0028-2a75-37b82d000000", - "Body" : "5d20d094-2ec7-4544-9ad1-86fc3aa14140Wed, 10 Jul 2019 23:18:38 GMTWed, 17 Jul 2019 23:18:38 GMTAgAAAAMAAAAAAAAAskA9znU31QE=Wed, 10 Jul 2019 23:18:38 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd226183-4003-0028-3675-37b82d000000", - "Body" : "5d20d094-2ec7-4544-9ad1-86fc3aa14140Wed, 10 Jul 2019 23:18:38 GMTWed, 17 Jul 2019 23:18:38 GMTAgAAAAMAAAAAAAAAOIYm4HU31QE=Wed, 10 Jul 2019 23:19:08 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f/messages/5d20d094-2ec7-4544-9ad1-86fc3aa14140?popreceipt=AgAAAAMAAAAAAAAAOIYm4HU31QE%3d", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd226190-4003-0028-3f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f?comp=metadata", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "Content-Length" : "0", - "x-ms-approximate-messages-count" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd2261a5-4003-0028-4e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2261ba-4003-0028-5e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue1154048f", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2261ce-4003-0028-6c75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - } ], - "variables" : [ "queue1154048f" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidMessageId.json b/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidMessageId.json deleted file mode 100644 index 4eccb534a46f..000000000000 --- a/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidMessageId.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221ea5-4003-0028-1075-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221eb9-4003-0028-2375-37b82d000000", - "Body" : "17aa480c-b8aa-47ce-9fdb-753a00853819Wed, 10 Jul 2019 23:17:54 GMTWed, 17 Jul 2019 23:17:54 GMTAgAAAAMAAAAAAAAALPXXs3U31QE=Wed, 10 Jul 2019 23:17:54 GMT", - "Date" : "Wed, 10 Jul 2019 23:17:54 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd221ecb-4003-0028-3575-37b82d000000", - "Body" : "17aa480c-b8aa-47ce-9fdb-753a00853819Wed, 10 Jul 2019 23:17:54 GMTWed, 17 Jul 2019 23:17:54 GMTAgAAAAMAAAAAAAAA4IjBxXU31QE=Wed, 10 Jul 2019 23:18:24 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:17:54 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad/messages/17aa480c-b8aa-47ce-9fdb-753a00853819random?popreceipt=AgAAAAMAAAAAAAAA4IjBxXU31QE%3d", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "MessageNotFound", - "retry-after" : "0", - "Content-Length" : "221", - "StatusCode" : "404", - "x-ms-request-id" : "dd221ee5-4003-0028-4d75-37b82d000000", - "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:dd221ee5-4003-0028-4d75-37b82d000000\nTime:2019-07-10T23:17:54.6327585Z", - "Date" : "Wed, 10 Jul 2019 23:17:54 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221ef8-4003-0028-5f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:54 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue96938aad", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221f17-4003-0028-7c75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:54 GMT" - } - } ], - "variables" : [ "queue96938aad" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidPopReceipt.json b/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidPopReceipt.json deleted file mode 100644 index 01154b0b743d..000000000000 --- a/storage/client/queue/src/test/resources/session-records/deleteMessageInvalidPopReceipt.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue67327535", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221e11-4003-0028-0575-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue67327535/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221e1c-4003-0028-0f75-37b82d000000", - "Body" : "a848cec9-d421-43a6-ac39-6a941d76d21bWed, 10 Jul 2019 23:17:54 GMTWed, 17 Jul 2019 23:17:54 GMTAgAAAAMAAAAAAAAAJDmgs3U31QE=Wed, 10 Jul 2019 23:17:54 GMT", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue67327535/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd221e2b-4003-0028-1e75-37b82d000000", - "Body" : "a848cec9-d421-43a6-ac39-6a941d76d21bWed, 10 Jul 2019 23:17:54 GMTWed, 17 Jul 2019 23:17:54 GMTAgAAAAMAAAAAAAAANWmKxXU31QE=Wed, 10 Jul 2019 23:18:24 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue67327535/messages/a848cec9-d421-43a6-ac39-6a941d76d21b?popreceipt=AgAAAAMAAAAAAAAANWmKxXU31QE%3drandom", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidQueryParameterValue", - "retry-after" : "0", - "Content-Length" : "444", - "StatusCode" : "400", - "x-ms-request-id" : "dd221e4c-4003-0028-3c75-37b82d000000", - "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:dd221e4c-4003-0028-3c75-37b82d000000\nTime:2019-07-10T23:17:54.2735030ZpopreceiptAgAAAAMAAAAAAAAANWmKxXU31QE=randomInvalid pop receipt format", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue67327535/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221e6a-4003-0028-5575-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue67327535", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221e7b-4003-0028-6675-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - } ], - "variables" : [ "queue67327535" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/dequeueMessage.json b/storage/client/queue/src/test/resources/session-records/dequeueMessage.json deleted file mode 100644 index 6473031c5a50..000000000000 --- a/storage/client/queue/src/test/resources/session-records/dequeueMessage.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue679346d1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221d34-4003-0028-3d75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:52 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue679346d1/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd221d8c-4003-0028-0a75-37b82d000000", - "Body" : "b6c999ca-9091-4109-b579-c4bca39d216dWed, 10 Jul 2019 23:17:53 GMTWed, 17 Jul 2019 23:17:53 GMTAgAAAAMAAAAAAAAA9bc/s3U31QE=Wed, 10 Jul 2019 23:17:53 GMT", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue679346d1/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd221da4-4003-0028-2275-37b82d000000", - "Body" : "b6c999ca-9091-4109-b579-c4bca39d216dWed, 10 Jul 2019 23:17:53 GMTWed, 17 Jul 2019 23:17:53 GMTAgAAAAMAAAAAAAAA11EwxXU31QE=Wed, 10 Jul 2019 23:18:23 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue679346d1/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221da9-4003-0028-2775-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue679346d1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd221db5-4003-0028-3275-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:17:53 GMT" - } - } ], - "variables" : [ "queue679346d1" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/dequeueMultipleMessages.json b/storage/client/queue/src/test/resources/session-records/dequeueMultipleMessages.json deleted file mode 100644 index 104a637b766d..000000000000 --- a/storage/client/queue/src/test/resources/session-records/dequeueMultipleMessages.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd226228-4003-0028-2f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd22623f-4003-0028-4475-37b82d000000", - "Body" : "3d48ff69-e261-4bea-839c-ca0edfc2af4cWed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMTAgAAAAMAAAAAAAAAYwGHznU31QE=Wed, 10 Jul 2019 23:18:39 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd226254-4003-0028-5375-37b82d000000", - "Body" : "fd6a25b1-b3d3-4743-b5b3-072add1a4a86Wed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMTAgAAAAMAAAAAAAAAz3yOznU31QE=Wed, 10 Jul 2019 23:18:39 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e/messages?numofmessages=2&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd226269-4003-0028-6475-37b82d000000", - "Body" : "3d48ff69-e261-4bea-839c-ca0edfc2af4cWed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMTAgAAAAMAAAAAAAAAWsJ34HU31QE=Wed, 10 Jul 2019 23:19:09 GMT1test messagefd6a25b1-b3d3-4743-b5b3-072add1a4a86Wed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMTAgAAAAMAAAAAAAAAWsJ34HU31QE=Wed, 10 Jul 2019 23:19:09 GMT1test message 2", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd226296-4003-0028-0975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue6570759e", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2262a9-4003-0028-1975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:38 GMT" - } - } ], - "variables" : [ "queue6570759e" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/enqueueEmptyMessage.json b/storage/client/queue/src/test/resources/session-records/enqueueEmptyMessage.json deleted file mode 100644 index ed0aaef6517f..000000000000 --- a/storage/client/queue/src/test/resources/session-records/enqueueEmptyMessage.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue76420ef8", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd2262ce-4003-0028-3475-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:39 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue76420ef8/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd2262e1-4003-0028-4275-37b82d000000", - "Body" : "e1efc34f-03c7-4037-9597-6955381e8889Wed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMTAgAAAAMAAAAAAAAAl6+7znU31QE=Wed, 10 Jul 2019 23:18:39 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:39 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue76420ef8/messages?peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd2262ef-4003-0028-5075-37b82d000000", - "Body" : "e1efc34f-03c7-4037-9597-6955381e8889Wed, 10 Jul 2019 23:18:39 GMTWed, 17 Jul 2019 23:18:39 GMT0", - "Date" : "Wed, 10 Jul 2019 23:18:39 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue76420ef8/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2262fe-4003-0028-5e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:39 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue76420ef8", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd22630f-4003-0028-6f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:39 GMT" - } - } ], - "variables" : [ "queue76420ef8" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/enqueueMessage.json b/storage/client/queue/src/test/resources/session-records/enqueueMessage.json deleted file mode 100644 index ff3e72aedaac..000000000000 --- a/storage/client/queue/src/test/resources/session-records/enqueueMessage.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue17032768", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222a23-4003-0028-4b75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue17032768/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222a4a-4003-0028-6c75-37b82d000000", - "Body" : "7422f1b3-c1b1-4385-a945-6365e2e01caaWed, 10 Jul 2019 23:18:01 GMTWed, 17 Jul 2019 23:18:01 GMTAgAAAAMAAAAAAAAAQm1FuHU31QE=Wed, 10 Jul 2019 23:18:01 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue17032768/messages?peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd222a74-4003-0028-1275-37b82d000000", - "Body" : "7422f1b3-c1b1-4385-a945-6365e2e01caaWed, 10 Jul 2019 23:18:01 GMTWed, 17 Jul 2019 23:18:01 GMT0test message", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue17032768/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222aa3-4003-0028-3975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue17032768", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222ac4-4003-0028-5675-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - } ], - "variables" : [ "queue17032768" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/listQueues.json b/storage/client/queue/src/test/resources/session-records/listQueues.json deleted file mode 100644 index 361f47abd400..000000000000 --- a/storage/client/queue/src/test/resources/session-records/listQueues.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue455724b60", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d2907f4-6003-009e-0976-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue455724b61", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290805-6003-009e-1376-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue455724b62", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d29080b-6003-009e-1876-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue455724b6&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d290816-6003-009e-2276-37b6d5000000", - "Body" : "queue455724b6queue455724b60queue455724b61queue455724b62", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue455724b6&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d29083e-6003-009e-4676-37b6d5000000", - "Body" : "queue455724b6queue455724b60queue455724b61queue455724b62", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b60/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290871-6003-009e-6e76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b60", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290896-6003-009e-0676-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b61/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2908bc-6003-009e-2476-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:48 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b61", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2908df-6003-009e-3e76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b62/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d2908fd-6003-009e-5676-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue455724b62", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d29091f-6003-009e-6a76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:49 GMT" - } - } ], - "variables" : [ "queue455724b6" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/listQueuesIncludeMetadata.json b/storage/client/queue/src/test/resources/session-records/listQueuesIncludeMetadata.json deleted file mode 100644 index a0e836cf2670..000000000000 --- a/storage/client/queue/src/test/resources/session-records/listQueuesIncludeMetadata.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae80", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290c20-6003-009e-7b76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae81", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290c34-6003-009e-0a76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae82", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290c4e-6003-009e-1f76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue58738ae8&include=metadata&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d290c6b-6003-009e-3376-37b6d5000000", - "Body" : "queue58738ae8queue58738ae80value1value2queue58738ae81queue58738ae82value1value2", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue58738ae8&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d290c8e-6003-009e-5176-37b6d5000000", - "Body" : "queue58738ae8queue58738ae80queue58738ae81queue58738ae82", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae80/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290caa-6003-009e-6876-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae80", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290cc1-6003-009e-7a76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae81/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290cde-6003-009e-1176-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae81", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290cf2-6003-009e-2376-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae82/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290d14-6003-009e-4076-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue58738ae82", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290d2b-6003-009e-5476-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:51 GMT" - } - } ], - "variables" : [ "queue58738ae8" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/listQueuesWithPrefix.json b/storage/client/queue/src/test/resources/session-records/listQueuesWithPrefix.json deleted file mode 100644 index ff107058e29f..000000000000 --- a/storage/client/queue/src/test/resources/session-records/listQueuesWithPrefix.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix0", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290acd-6003-009e-5476-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue423382ef1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290ae3-6003-009e-6876-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix2", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0d290afd-6003-009e-8076-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue423382efprefix&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d290b0d-6003-009e-0f76-37b6d5000000", - "Body" : "queue423382efprefixqueue423382efprefix0queue423382efprefix2", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net?prefix=queue423382ef&include=&comp=list", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0d290b16-6003-009e-1776-37b6d5000000", - "Body" : "queue423382efqueue423382ef1queue423382efprefix0queue423382efprefix2", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382ef1/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b38-6003-009e-3576-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382ef1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b4c-6003-009e-4776-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix0/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b60-6003-009e-5976-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix0", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b71-6003-009e-6676-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix2/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b81-6003-009e-7576-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue423382efprefix2", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "0d290b9a-6003-009e-0b76-37b6d5000000", - "Date" : "Wed, 10 Jul 2019 23:24:50 GMT" - } - } ], - "variables" : [ "queue423382ef" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/peekMessage.json b/storage/client/queue/src/test/resources/session-records/peekMessage.json deleted file mode 100644 index 540c460785a1..000000000000 --- a/storage/client/queue/src/test/resources/session-records/peekMessage.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue54577e60", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd225fa8-4003-0028-0d75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:36 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue54577e60/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd225fb8-4003-0028-1c75-37b82d000000", - "Body" : "53096a37-63bf-45d9-9172-4c8713ff282eWed, 10 Jul 2019 23:18:37 GMTWed, 17 Jul 2019 23:18:37 GMTAgAAAAMAAAAAAAAATsJgzXU31QE=Wed, 10 Jul 2019 23:18:37 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:36 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue54577e60/messages?peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd225fd2-4003-0028-3375-37b82d000000", - "Body" : "53096a37-63bf-45d9-9172-4c8713ff282eWed, 10 Jul 2019 23:18:37 GMTWed, 17 Jul 2019 23:18:37 GMT0test message", - "Date" : "Wed, 10 Jul 2019 23:18:36 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue54577e60/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd225fe6-4003-0028-4775-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:36 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue54577e60", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd225ff7-4003-0028-5875-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:37 GMT" - } - } ], - "variables" : [ "queue54577e60" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/peekMultipleMessages.json b/storage/client/queue/src/test/resources/session-records/peekMultipleMessages.json deleted file mode 100644 index 5ea0a89b15f9..000000000000 --- a/storage/client/queue/src/test/resources/session-records/peekMultipleMessages.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue17925938", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222afc-4003-0028-0875-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue17925938/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222b1e-4003-0028-2375-37b82d000000", - "Body" : "86c3b192-2c4f-4bd4-89bf-07553c141ac0Wed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMTAgAAAAMAAAAAAAAAI8dyuHU31QE=Wed, 10 Jul 2019 23:18:02 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue17925938/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222b4a-4003-0028-4775-37b82d000000", - "Body" : "1b2d50b7-3540-4dd4-a480-8549b5207fe7Wed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMTAgAAAAMAAAAAAAAAqWl6uHU31QE=Wed, 10 Jul 2019 23:18:02 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue17925938/messages?numofmessages=2&peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd222b67-4003-0028-6175-37b82d000000", - "Body" : "86c3b192-2c4f-4bd4-89bf-07553c141ac0Wed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMT0test message1b2d50b7-3540-4dd4-a480-8549b5207fe7Wed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMT0test message 2", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue17925938/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222b7e-4003-0028-7675-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue17925938", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222b8e-4003-0028-0675-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:01 GMT" - } - } ], - "variables" : [ "queue17925938" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/updateMessage.json b/storage/client/queue/src/test/resources/session-records/updateMessage.json deleted file mode 100644 index 46e184bda045..000000000000 --- a/storage/client/queue/src/test/resources/session-records/updateMessage.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222c30-4003-0028-0f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:02 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd222c40-4003-0028-1c75-37b82d000000", - "Body" : "c3781181-9103-468e-b645-f6dbb100bd9cWed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMTAgAAAAMAAAAAAAAAjQ/SuHU31QE=Wed, 10 Jul 2019 23:18:02 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:02 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd222c62-4003-0028-3b75-37b82d000000", - "Body" : "c3781181-9103-468e-b645-f6dbb100bd9cWed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMTAgAAAAMAAAAAAAAAEAO9ynU31QE=Wed, 10 Jul 2019 23:18:32 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:18:02 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c/messages/c3781181-9103-468e-b645-f6dbb100bd9c?popreceipt=AgAAAAMAAAAAAAAAEAO9ynU31QE%3d&visibilitytimeout=1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-time-next-visible" : "Wed, 10 Jul 2019 23:18:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd222c7f-4003-0028-5475-37b82d000000", - "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAZuN9uXU31QEBAAAA", - "Date" : "Wed, 10 Jul 2019 23:18:02 GMT" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c/messages?peekonly=true", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd2230d0-4003-0028-1b75-37b82d000000", - "Body" : "c3781181-9103-468e-b645-f6dbb100bd9cWed, 10 Jul 2019 23:18:02 GMTWed, 17 Jul 2019 23:18:02 GMT1updated test message", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2230e9-4003-0028-2e75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue4236461c", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd223113-4003-0028-4f75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT" - } - } ], - "variables" : [ "queue4236461c" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/updateMessageInvalidMessageId.json b/storage/client/queue/src/test/resources/session-records/updateMessageInvalidMessageId.json deleted file mode 100644 index eae58afb9650..000000000000 --- a/storage/client/queue/src/test/resources/session-records/updateMessageInvalidMessageId.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue10019121", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd223139-4003-0028-6d75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue10019121/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd223159-4003-0028-0475-37b82d000000", - "Body" : "e3dbec12-5e3c-47f4-abd9-fbdf6e44746dWed, 10 Jul 2019 23:18:05 GMTWed, 17 Jul 2019 23:18:05 GMTAgAAAAMAAAAAAAAA7UtBunU31QE=Wed, 10 Jul 2019 23:18:05 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue10019121/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd223169-4003-0028-1475-37b82d000000", - "Body" : "e3dbec12-5e3c-47f4-abd9-fbdf6e44746dWed, 10 Jul 2019 23:18:05 GMTWed, 17 Jul 2019 23:18:05 GMTAgAAAAMAAAAAAAAAc5EqzHU31QE=Wed, 10 Jul 2019 23:18:35 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue10019121/messages/e3dbec12-5e3c-47f4-abd9-fbdf6e44746drandom?popreceipt=AgAAAAMAAAAAAAAAc5EqzHU31QE%3d&visibilitytimeout=1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "MessageNotFound", - "retry-after" : "0", - "Content-Length" : "221", - "StatusCode" : "404", - "x-ms-request-id" : "dd22317f-4003-0028-2775-37b82d000000", - "Body" : "MessageNotFoundThe specified message does not exist.\nRequestId:dd22317f-4003-0028-2775-37b82d000000\nTime:2019-07-10T23:18:05.3974051Z", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue10019121/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd223195-4003-0028-3975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:04 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue10019121", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd2231a9-4003-0028-4975-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT" - } - } ], - "variables" : [ "queue10019121" ] -} \ No newline at end of file diff --git a/storage/client/queue/src/test/resources/session-records/updateMessageInvalidPopReceipt.json b/storage/client/queue/src/test/resources/session-records/updateMessageInvalidPopReceipt.json deleted file mode 100644 index f7795c878f27..000000000000 --- a/storage/client/queue/src/test/resources/session-records/updateMessageInvalidPopReceipt.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd22326c-4003-0028-6c75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT" - } - }, { - "Method" : "POST", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30/messages?visibilitytimeout=0&messagettl=604800", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dd22329c-4003-0028-1475-37b82d000000", - "Body" : "8900ad74-7404-4cd2-8b4b-41e70995dc1fWed, 10 Jul 2019 23:18:06 GMTWed, 17 Jul 2019 23:18:06 GMTAgAAAAMAAAAAAAAA/TyvunU31QE=Wed, 10 Jul 2019 23:18:06 GMT", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "GET", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30/messages?numofmessages=1&visibilitytimeout=30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "Cache-Control" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "dd2232d5-4003-0028-4575-37b82d000000", - "Body" : "8900ad74-7404-4cd2-8b4b-41e70995dc1fWed, 10 Jul 2019 23:18:06 GMTWed, 17 Jul 2019 23:18:06 GMTAgAAAAMAAAAAAAAA+kWZzHU31QE=Wed, 10 Jul 2019 23:18:36 GMT1test message", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "PUT", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30/messages/8900ad74-7404-4cd2-8b4b-41e70995dc1f?popreceipt=AgAAAAMAAAAAAAAA%2bkWZzHU31QE%3drandom&visibilitytimeout=1", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidQueryParameterValue", - "retry-after" : "0", - "Content-Length" : "444", - "StatusCode" : "400", - "x-ms-request-id" : "dd2232ff-4003-0028-6d75-37b82d000000", - "Body" : "InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid.\nRequestId:dd2232ff-4003-0028-6d75-37b82d000000\nTime:2019-07-10T23:18:06.1209188ZpopreceiptAgAAAAMAAAAAAAAA+kWZzHU31QE=randomInvalid pop receipt format", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT", - "Content-Type" : "application/xml" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30/messages", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd22331d-4003-0028-0a75-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT" - } - }, { - "Method" : "DELETE", - "Uri" : "https://sima.queue.core.windows.net/queue41380e30", - "Headers" : { - "x-ms-version" : "2018-03-28", - "User-Agent" : "azsdk-java-storage-queue/1.0.0-SNAPSHOT 1.8.0_201; Windows 10 10.0" - }, - "Response" : { - "x-ms-version" : "2018-03-28", - "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "204", - "x-ms-request-id" : "dd223333-4003-0028-2075-37b82d000000", - "Date" : "Wed, 10 Jul 2019 23:18:05 GMT" - } - } ], - "variables" : [ "queue41380e30" ] -} \ No newline at end of file