diff --git a/sdk/azurestack/mgmt-v2017_06_01/pom.xml b/sdk/azurestack/mgmt-v2017_06_01/pom.xml
index 1891ac79e861..261684d344e2 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/pom.xml
+++ b/sdk/azurestack/mgmt-v2017_06_01/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-azurestack
- 1.0.0-beta-1
+ 1.0.0-beta
jar
Microsoft Azure SDK for AzureStack Management
This package contains Microsoft AzureStack Management SDK.
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileDeploymentData.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileDeploymentData.java
new file mode 100644
index 000000000000..9fb923c493eb
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileDeploymentData.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.azurestack.v2017_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Cloud specific manifest data for AzureStack deployment.
+ */
+@JsonFlatten
+public class CloudManifestFileDeploymentData {
+ /**
+ * Dsms external certificates.
+ */
+ @JsonProperty(value = "externalDsmsCertificates")
+ private String externalDsmsCertificates;
+
+ /**
+ * Signing verification public key.
+ */
+ @JsonProperty(value = "customCloudVerificationKey")
+ private String customCloudVerificationKey;
+
+ /**
+ * ARM endpoint.
+ */
+ @JsonProperty(value = "customEnvironmentEndpoints.customCloudArmEndpoint")
+ private String customCloudArmEndpoint;
+
+ /**
+ * Dsms endpoint.
+ */
+ @JsonProperty(value = "customEnvironmentEndpoints.externalDsmsEndpoint")
+ private String externalDsmsEndpoint;
+
+ /**
+ * Get dsms external certificates.
+ *
+ * @return the externalDsmsCertificates value
+ */
+ public String externalDsmsCertificates() {
+ return this.externalDsmsCertificates;
+ }
+
+ /**
+ * Set dsms external certificates.
+ *
+ * @param externalDsmsCertificates the externalDsmsCertificates value to set
+ * @return the CloudManifestFileDeploymentData object itself.
+ */
+ public CloudManifestFileDeploymentData withExternalDsmsCertificates(String externalDsmsCertificates) {
+ this.externalDsmsCertificates = externalDsmsCertificates;
+ return this;
+ }
+
+ /**
+ * Get signing verification public key.
+ *
+ * @return the customCloudVerificationKey value
+ */
+ public String customCloudVerificationKey() {
+ return this.customCloudVerificationKey;
+ }
+
+ /**
+ * Set signing verification public key.
+ *
+ * @param customCloudVerificationKey the customCloudVerificationKey value to set
+ * @return the CloudManifestFileDeploymentData object itself.
+ */
+ public CloudManifestFileDeploymentData withCustomCloudVerificationKey(String customCloudVerificationKey) {
+ this.customCloudVerificationKey = customCloudVerificationKey;
+ return this;
+ }
+
+ /**
+ * Get aRM endpoint.
+ *
+ * @return the customCloudArmEndpoint value
+ */
+ public String customCloudArmEndpoint() {
+ return this.customCloudArmEndpoint;
+ }
+
+ /**
+ * Set aRM endpoint.
+ *
+ * @param customCloudArmEndpoint the customCloudArmEndpoint value to set
+ * @return the CloudManifestFileDeploymentData object itself.
+ */
+ public CloudManifestFileDeploymentData withCustomCloudArmEndpoint(String customCloudArmEndpoint) {
+ this.customCloudArmEndpoint = customCloudArmEndpoint;
+ return this;
+ }
+
+ /**
+ * Get dsms endpoint.
+ *
+ * @return the externalDsmsEndpoint value
+ */
+ public String externalDsmsEndpoint() {
+ return this.externalDsmsEndpoint;
+ }
+
+ /**
+ * Set dsms endpoint.
+ *
+ * @param externalDsmsEndpoint the externalDsmsEndpoint value to set
+ * @return the CloudManifestFileDeploymentData object itself.
+ */
+ public CloudManifestFileDeploymentData withExternalDsmsEndpoint(String externalDsmsEndpoint) {
+ this.externalDsmsEndpoint = externalDsmsEndpoint;
+ return this;
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileProperties.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileProperties.java
new file mode 100644
index 000000000000..61427909f75c
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileProperties.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.azurestack.v2017_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Cloud specific manifest JSON properties.
+ */
+public class CloudManifestFileProperties {
+ /**
+ * Cloud specific manifest data.
+ */
+ @JsonProperty(value = "deploymentData")
+ private CloudManifestFileDeploymentData deploymentData;
+
+ /**
+ * Signature of the cloud specific manifest data.
+ */
+ @JsonProperty(value = "signature")
+ private String signature;
+
+ /**
+ * Get cloud specific manifest data.
+ *
+ * @return the deploymentData value
+ */
+ public CloudManifestFileDeploymentData deploymentData() {
+ return this.deploymentData;
+ }
+
+ /**
+ * Set cloud specific manifest data.
+ *
+ * @param deploymentData the deploymentData value to set
+ * @return the CloudManifestFileProperties object itself.
+ */
+ public CloudManifestFileProperties withDeploymentData(CloudManifestFileDeploymentData deploymentData) {
+ this.deploymentData = deploymentData;
+ return this;
+ }
+
+ /**
+ * Get signature of the cloud specific manifest data.
+ *
+ * @return the signature value
+ */
+ public String signature() {
+ return this.signature;
+ }
+
+ /**
+ * Set signature of the cloud specific manifest data.
+ *
+ * @param signature the signature value to set
+ * @return the CloudManifestFileProperties object itself.
+ */
+ public CloudManifestFileProperties withSignature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileResponse.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileResponse.java
new file mode 100644
index 000000000000..39d9320afe90
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFileResponse.java
@@ -0,0 +1,45 @@
+/**
+ * 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.azurestack.v2017_06_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.azurestack.v2017_06_01.implementation.AzureStackManager;
+import com.microsoft.azure.management.azurestack.v2017_06_01.implementation.CloudManifestFileResponseInner;
+
+/**
+ * Type representing CloudManifestFileResponse.
+ */
+public interface CloudManifestFileResponse extends HasInner, HasManager {
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ CloudManifestFileProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFiles.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFiles.java
new file mode 100644
index 000000000000..f10170c8dc56
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/CloudManifestFiles.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.azurestack.v2017_06_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.azurestack.v2017_06_01.implementation.CloudManifestFilesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing CloudManifestFiles.
+ */
+public interface CloudManifestFiles extends HasInner {
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String verificationVersion);
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Products.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Products.java
index f9856fe40a8c..e78651d3f2ce 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Products.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Products.java
@@ -35,7 +35,7 @@ public interface Products extends HasInner {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable getProductsAsync(String resourceGroup, String registrationName, DeviceConfiguration deviceConfiguration);
+ Observable getProductsAsync(String resourceGroup, String registrationName);
/**
* Returns the specified product.
@@ -46,7 +46,7 @@ public interface Products extends HasInner {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable getProductAsync(String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration);
+ Observable getProductAsync(String resourceGroup, String registrationName, String productName);
/**
* Returns the specified product.
@@ -57,7 +57,7 @@ public interface Products extends HasInner {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable uploadLogAsync(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate);
+ Observable uploadLogAsync(String resourceGroup, String registrationName, String productName);
/**
* Returns the specified product.
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Registration.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Registration.java
index 626ee6c2431b..c09e91d885a4 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Registration.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/Registration.java
@@ -89,12 +89,24 @@ interface WithCreate extends Creatable, Resource.DefinitionWithTag
/**
* The template for a Registration update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, Resource.UpdateWithTags {
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithRegistrationToken {
}
/**
* Grouping of Registration update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the registration update allowing to specify RegistrationToken.
+ */
+ interface WithRegistrationToken {
+ /**
+ * Specifies registrationToken.
+ * @param registrationToken The token identifying registered Azure Stack
+ * @return the next update stage
+ */
+ Update withRegistrationToken(String registrationToken);
+ }
+
}
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/RegistrationParameter.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/RegistrationParameter.java
index c50143b91b65..4614f6a5ad60 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/RegistrationParameter.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/RegistrationParameter.java
@@ -23,10 +23,18 @@ public class RegistrationParameter {
private String registrationToken;
/**
- * Location of the resource. Possible values include: 'global'.
+ * Location of the resource.
*/
- @JsonProperty(value = "location")
- private Location location;
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /**
+ * Creates an instance of RegistrationParameter class.
+ * @param registrationToken the token identifying registered Azure Stack.
+ */
+ public RegistrationParameter() {
+ location = "global";
+ }
/**
* Get the token identifying registered Azure Stack.
@@ -49,21 +57,21 @@ public RegistrationParameter withRegistrationToken(String registrationToken) {
}
/**
- * Get location of the resource. Possible values include: 'global'.
+ * Get location of the resource.
*
* @return the location value
*/
- public Location location() {
+ public String location() {
return this.location;
}
/**
- * Set location of the resource. Possible values include: 'global'.
+ * Set location of the resource.
*
* @param location the location value to set
* @return the RegistrationParameter object itself.
*/
- public RegistrationParameter withLocation(Location location) {
+ public RegistrationParameter withLocation(String location) {
this.location = location;
return this;
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManagementClientImpl.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManagementClientImpl.java
index 7bcc9fca010d..99b91654c902 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManagementClientImpl.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManagementClientImpl.java
@@ -145,6 +145,19 @@ public OperationsInner operations() {
return this.operations;
}
+ /**
+ * The CloudManifestFilesInner object to access its operations.
+ */
+ private CloudManifestFilesInner cloudManifestFiles;
+
+ /**
+ * Gets the CloudManifestFilesInner object to access its operations.
+ * @return the CloudManifestFilesInner object.
+ */
+ public CloudManifestFilesInner cloudManifestFiles() {
+ return this.cloudManifestFiles;
+ }
+
/**
* The ProductsInner object to access its operations.
*/
@@ -220,6 +233,7 @@ protected void initialize() {
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.cloudManifestFiles = new CloudManifestFilesInner(restClient().retrofit(), this);
this.products = new ProductsInner(restClient().retrofit(), this);
this.registrations = new RegistrationsInner(restClient().retrofit(), this);
this.customerSubscriptions = new CustomerSubscriptionsInner(restClient().retrofit(), this);
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManager.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManager.java
index 3c492de474da..e49d5816d998 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManager.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/AzureStackManager.java
@@ -17,6 +17,7 @@
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
import com.microsoft.azure.management.azurestack.v2017_06_01.Operations;
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFiles;
import com.microsoft.azure.management.azurestack.v2017_06_01.Products;
import com.microsoft.azure.management.azurestack.v2017_06_01.Registrations;
import com.microsoft.azure.management.azurestack.v2017_06_01.CustomerSubscriptions;
@@ -28,6 +29,7 @@
*/
public final class AzureStackManager extends ManagerCore {
private Operations operations;
+ private CloudManifestFiles cloudManifestFiles;
private Products products;
private Registrations registrations;
private CustomerSubscriptions customerSubscriptions;
@@ -88,6 +90,16 @@ public Operations operations() {
return this.operations;
}
+ /**
+ * @return Entry point to manage CloudManifestFiles.
+ */
+ public CloudManifestFiles cloudManifestFiles() {
+ if (this.cloudManifestFiles == null) {
+ this.cloudManifestFiles = new CloudManifestFilesImpl(this);
+ }
+ return this.cloudManifestFiles;
+ }
+
/**
* @return Entry point to manage Products.
*/
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseImpl.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseImpl.java
new file mode 100644
index 000000000000..304de4538248
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseImpl.java
@@ -0,0 +1,52 @@
+/**
+ * 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.azurestack.v2017_06_01.implementation;
+
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFileResponse;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFileProperties;
+
+class CloudManifestFileResponseImpl extends WrapperImpl implements CloudManifestFileResponse {
+ private final AzureStackManager manager;
+ CloudManifestFileResponseImpl(CloudManifestFileResponseInner inner, AzureStackManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public AzureStackManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String etag() {
+ return this.inner().etag();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public CloudManifestFileProperties properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseInner.java
new file mode 100644
index 000000000000..d70c9a3bdee9
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFileResponseInner.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.azurestack.v2017_06_01.implementation;
+
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFileProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Cloud specific manifest GET response.
+ */
+public class CloudManifestFileResponseInner extends ProxyResource {
+ /**
+ * Cloud specific manifest data.
+ */
+ @JsonProperty(value = "properties")
+ private CloudManifestFileProperties properties;
+
+ /**
+ * The entity tag used for optimistic concurrency when modifying the
+ * resource.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /**
+ * Get cloud specific manifest data.
+ *
+ * @return the properties value
+ */
+ public CloudManifestFileProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set cloud specific manifest data.
+ *
+ * @param properties the properties value to set
+ * @return the CloudManifestFileResponseInner object itself.
+ */
+ public CloudManifestFileResponseInner withProperties(CloudManifestFileProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @param etag the etag value to set
+ * @return the CloudManifestFileResponseInner object itself.
+ */
+ public CloudManifestFileResponseInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesImpl.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesImpl.java
new file mode 100644
index 000000000000..85635c7ec991
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesImpl.java
@@ -0,0 +1,54 @@
+/**
+ * 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.azurestack.v2017_06_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFiles;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFileResponse;
+
+class CloudManifestFilesImpl extends WrapperImpl implements CloudManifestFiles {
+ private final AzureStackManager manager;
+
+ CloudManifestFilesImpl(AzureStackManager manager) {
+ super(manager.inner().cloudManifestFiles());
+ this.manager = manager;
+ }
+
+ public AzureStackManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable getAsync(String verificationVersion) {
+ CloudManifestFilesInner client = this.inner();
+ return client.getAsync(verificationVersion)
+ .map(new Func1() {
+ @Override
+ public CloudManifestFileResponse call(CloudManifestFileResponseInner inner) {
+ return new CloudManifestFileResponseImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listAsync() {
+ CloudManifestFilesInner client = this.inner();
+ return client.listAsync()
+ .map(new Func1() {
+ @Override
+ public CloudManifestFileResponse call(CloudManifestFileResponseInner inner) {
+ return new CloudManifestFileResponseImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesInner.java
new file mode 100644
index 000000000000..cd8e5d1dff76
--- /dev/null
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CloudManifestFilesInner.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.azurestack.v2017_06_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.management.azurestack.v2017_06_01.ErrorResponseException;
+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.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+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 CloudManifestFiles.
+ */
+public class CloudManifestFilesInner {
+ /** The Retrofit service to perform REST calls. */
+ private CloudManifestFilesService service;
+ /** The service client containing this operation class. */
+ private AzureStackManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CloudManifestFilesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public CloudManifestFilesInner(Retrofit retrofit, AzureStackManagementClientImpl client) {
+ this.service = retrofit.create(CloudManifestFilesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CloudManifestFiles to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface CloudManifestFilesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.CloudManifestFiles list" })
+ @GET("providers/Microsoft.AzureStack/cloudManifestFiles")
+ 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.azurestack.v2017_06_01.CloudManifestFiles get" })
+ @GET("providers/Microsoft.AzureStack/cloudManifestFiles/{verificationVersion}")
+ Observable> get(@Path("verificationVersion") String verificationVersion, @Query("versionCreationDate") String versionCreationDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CloudManifestFileResponseInner object if successful.
+ */
+ public CloudManifestFileResponseInner list() {
+ return listWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ *
+ * @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 ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable listAsync() {
+ return listWithServiceResponseAsync().map(new Func1, CloudManifestFileResponseInner>() {
+ @Override
+ public CloudManifestFileResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable> listWithServiceResponseAsync() {
+ 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 clientResponse = listDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CloudManifestFileResponseInner object if successful.
+ */
+ public CloudManifestFileResponseInner get(String verificationVersion) {
+ return getWithServiceResponseAsync(verificationVersion).toBlocking().single().body();
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @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 verificationVersion, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(verificationVersion), serviceCallback);
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable getAsync(String verificationVersion) {
+ return getWithServiceResponseAsync(verificationVersion).map(new Func1, CloudManifestFileResponseInner>() {
+ @Override
+ public CloudManifestFileResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable> getWithServiceResponseAsync(String verificationVersion) {
+ if (verificationVersion == null) {
+ throw new IllegalArgumentException("Parameter verificationVersion 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 String versionCreationDate = null;
+ return service.get(verificationVersion, versionCreationDate, 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);
+ }
+ }
+ });
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @param versionCreationDate Signing verification key version creation date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CloudManifestFileResponseInner object if successful.
+ */
+ public CloudManifestFileResponseInner get(String verificationVersion, String versionCreationDate) {
+ return getWithServiceResponseAsync(verificationVersion, versionCreationDate).toBlocking().single().body();
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @param versionCreationDate Signing verification key version creation date.
+ * @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 verificationVersion, String versionCreationDate, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(verificationVersion, versionCreationDate), serviceCallback);
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @param versionCreationDate Signing verification key version creation date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable getAsync(String verificationVersion, String versionCreationDate) {
+ return getWithServiceResponseAsync(verificationVersion, versionCreationDate).map(new Func1, CloudManifestFileResponseInner>() {
+ @Override
+ public CloudManifestFileResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ *
+ * @param verificationVersion Signing verification key version.
+ * @param versionCreationDate Signing verification key version creation date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CloudManifestFileResponseInner object
+ */
+ public Observable> getWithServiceResponseAsync(String verificationVersion, String versionCreationDate) {
+ if (verificationVersion == null) {
+ throw new IllegalArgumentException("Parameter verificationVersion 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(verificationVersion, versionCreationDate, 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 ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CustomerSubscriptionsInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CustomerSubscriptionsInner.java
index b5b51e6a519b..b59356429565 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CustomerSubscriptionsInner.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/CustomerSubscriptionsInner.java
@@ -11,7 +11,6 @@
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.azurestack.v2017_06_01.ErrorResponseException;
import com.microsoft.azure.Page;
@@ -307,7 +306,7 @@ private ServiceResponse getDelegate(Response> call(Response response) {
});
}
- private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(204, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
@@ -401,7 +400,7 @@ private ServiceResponse deleteDelegate(Response response) th
* @param customerSubscriptionName Name of the product.
* @param customerCreationParameters Parameters use to create a customer subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the CustomerSubscriptionInner object if successful.
*/
@@ -487,10 +486,10 @@ public Observable> call(Response createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse createDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/OperationsInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/OperationsInner.java
index 4a7eb376e13f..35ef093fa0af 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/OperationsInner.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/OperationsInner.java
@@ -11,8 +11,8 @@
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.azurestack.v2017_06_01.ErrorResponseException;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceFuture;
@@ -69,7 +69,7 @@ interface OperationsService {
* Returns the list of supported REST operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException 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.
*/
@@ -162,10 +162,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken>() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
@@ -174,7 +174,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken>() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsImpl.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsImpl.java
index 91d72776f0da..20e5a1f76d54 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsImpl.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsImpl.java
@@ -14,9 +14,7 @@
import rx.Observable;
import rx.functions.Func1;
import com.microsoft.azure.Page;
-import com.microsoft.azure.management.azurestack.v2017_06_01.DeviceConfiguration;
import com.microsoft.azure.management.azurestack.v2017_06_01.ExtendedProduct;
-import com.microsoft.azure.management.azurestack.v2017_06_01.MarketplaceProductLogUpdate;
import com.microsoft.azure.management.azurestack.v2017_06_01.ProductList;
import com.microsoft.azure.management.azurestack.v2017_06_01.Product;
import com.microsoft.azure.management.azurestack.v2017_06_01.ProductLog;
@@ -50,9 +48,9 @@ public ExtendedProduct call(ExtendedProductInner inner) {
}
@Override
- public Observable getProductsAsync(String resourceGroup, String registrationName, DeviceConfiguration deviceConfiguration) {
+ public Observable getProductsAsync(String resourceGroup, String registrationName) {
ProductsInner client = this.inner();
- return client.getProductsAsync(resourceGroup, registrationName, deviceConfiguration)
+ return client.getProductsAsync(resourceGroup, registrationName)
.map(new Func1() {
@Override
public ProductList call(ProductListInner inner) {
@@ -62,9 +60,9 @@ public ProductList call(ProductListInner inner) {
}
@Override
- public Observable getProductAsync(String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration) {
+ public Observable getProductAsync(String resourceGroup, String registrationName, String productName) {
ProductsInner client = this.inner();
- return client.getProductAsync(resourceGroup, registrationName, productName, deviceConfiguration)
+ return client.getProductAsync(resourceGroup, registrationName, productName)
.map(new Func1() {
@Override
public Product call(ProductInner inner) {
@@ -74,9 +72,9 @@ public Product call(ProductInner inner) {
}
@Override
- public Observable uploadLogAsync(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate) {
+ public Observable uploadLogAsync(String resourceGroup, String registrationName, String productName) {
ProductsInner client = this.inner();
- return client.uploadLogAsync(resourceGroup, registrationName, productName, marketplaceProductLogUpdate)
+ return client.uploadLogAsync(resourceGroup, registrationName, productName)
.map(new Func1() {
@Override
public ProductLog call(ProductLogInner inner) {
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsInner.java
index e24cd7fdd355..8a5d51f69b1b 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsInner.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/ProductsInner.java
@@ -11,7 +11,6 @@
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.azurestack.v2017_06_01.DeviceConfiguration;
import com.microsoft.azure.management.azurestack.v2017_06_01.ErrorResponseException;
@@ -75,11 +74,11 @@ interface ProductsService {
Observable> listDetails(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Path("productName") String productName, @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.azurestack.v2017_06_01.Products getProducts" })
- @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts")
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/getProducts")
Observable> getProducts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeviceConfiguration deviceConfiguration, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.Products getProduct" })
- @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct")
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProduct")
Observable> getProduct(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Path("productName") String productName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeviceConfiguration deviceConfiguration, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.Products uploadLog" })
@@ -315,7 +314,7 @@ private ServiceResponse getDelegate(Response respons
* @param registrationName Name of the Azure Stack registration.
* @param productName Name of the product.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ExtendedProductInner object if successful.
*/
@@ -394,10 +393,10 @@ public Observable> call(Response listDetailsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse listDetailsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
@@ -411,8 +410,8 @@ private ServiceResponse listDetailsDelegate(Response getProductsAsync(String resourceGroup, String registrationName, DeviceConfiguration deviceConfiguration, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getProductsWithServiceResponseAsync(resourceGroup, registrationName, deviceConfiguration), serviceCallback);
+ public ServiceFuture getProductsAsync(String resourceGroup, String registrationName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getProductsWithServiceResponseAsync(resourceGroup, registrationName), serviceCallback);
}
/**
@@ -436,8 +435,8 @@ public ServiceFuture getProductsAsync(String resourceGroup, St
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductListInner object
*/
- public Observable getProductsAsync(String resourceGroup, String registrationName, DeviceConfiguration deviceConfiguration) {
- return getProductsWithServiceResponseAsync(resourceGroup, registrationName, deviceConfiguration).map(new Func1, ProductListInner>() {
+ public Observable getProductsAsync(String resourceGroup, String registrationName) {
+ return getProductsWithServiceResponseAsync(resourceGroup, registrationName).map(new Func1, ProductListInner>() {
@Override
public ProductListInner call(ServiceResponse response) {
return response.body();
@@ -453,7 +452,7 @@ public ProductListInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductListInner object
*/
- public Observable> getProductsWithServiceResponseAsync(String resourceGroup, String registrationName, DeviceConfiguration deviceConfiguration) {
+ public Observable> getProductsWithServiceResponseAsync(String resourceGroup, String registrationName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -498,8 +497,8 @@ private ServiceResponse getProductsDelegate(Response getProductAsync(String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getProductWithServiceResponseAsync(resourceGroup, registrationName, productName, deviceConfiguration), serviceCallback);
+ public ServiceFuture getProductAsync(String resourceGroup, String registrationName, String productName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getProductWithServiceResponseAsync(resourceGroup, registrationName, productName), serviceCallback);
}
/**
@@ -525,8 +524,8 @@ public ServiceFuture getProductAsync(String resourceGroup, String
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductInner object
*/
- public Observable getProductAsync(String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration) {
- return getProductWithServiceResponseAsync(resourceGroup, registrationName, productName, deviceConfiguration).map(new Func1, ProductInner>() {
+ public Observable getProductAsync(String resourceGroup, String registrationName, String productName) {
+ return getProductWithServiceResponseAsync(resourceGroup, registrationName, productName).map(new Func1, ProductInner>() {
@Override
public ProductInner call(ServiceResponse response) {
return response.body();
@@ -543,7 +542,7 @@ public ProductInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductInner object
*/
- public Observable> getProductWithServiceResponseAsync(String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration) {
+ public Observable> getProductWithServiceResponseAsync(String resourceGroup, String registrationName, String productName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -591,8 +590,8 @@ private ServiceResponse getProductDelegate(Response
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProductLogInner object if successful.
*/
- public ProductLogInner uploadLog(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate) {
- return uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName, marketplaceProductLogUpdate).toBlocking().single().body();
+ public ProductLogInner uploadLog(String resourceGroup, String registrationName, String productName) {
+ return uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName).toBlocking().single().body();
}
/**
@@ -605,8 +604,8 @@ public ProductLogInner uploadLog(String resourceGroup, String registrationName,
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture uploadLogAsync(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName, marketplaceProductLogUpdate), serviceCallback);
+ public ServiceFuture uploadLogAsync(String resourceGroup, String registrationName, String productName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName), serviceCallback);
}
/**
@@ -618,8 +617,8 @@ public ServiceFuture uploadLogAsync(String resourceGroup, Strin
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductLogInner object
*/
- public Observable uploadLogAsync(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate) {
- return uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName, marketplaceProductLogUpdate).map(new Func1, ProductLogInner>() {
+ public Observable uploadLogAsync(String resourceGroup, String registrationName, String productName) {
+ return uploadLogWithServiceResponseAsync(resourceGroup, registrationName, productName).map(new Func1, ProductLogInner>() {
@Override
public ProductLogInner call(ServiceResponse response) {
return response.body();
@@ -636,7 +635,7 @@ public ProductLogInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProductLogInner object
*/
- public Observable> uploadLogWithServiceResponseAsync(String resourceGroup, String registrationName, String productName, MarketplaceProductLogUpdate marketplaceProductLogUpdate) {
+ public Observable> uploadLogWithServiceResponseAsync(String resourceGroup, String registrationName, String productName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationImpl.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationImpl.java
index 4bb0b152c8f2..c1d132d9a85f 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationImpl.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationImpl.java
@@ -9,45 +9,27 @@
package com.microsoft.azure.management.azurestack.v2017_06_01.implementation;
import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
-import com.microsoft.azure.management.azurestack.v2017_06_01.Location;
import com.microsoft.azure.management.azurestack.v2017_06_01.Registration;
import rx.Observable;
-import com.microsoft.azure.management.azurestack.v2017_06_01.RegistrationParameter;
-import rx.functions.Func1;
class RegistrationImpl extends GroupableResourceCoreImpl implements Registration, Registration.Definition, Registration.Update {
- private RegistrationParameter createOrUpdateParameter;
+ private String cregistrationToken;
+ private String uregistrationToken;
RegistrationImpl(String name, RegistrationInner inner, AzureStackManager manager) {
super(name, inner, manager);
- this.createOrUpdateParameter = new RegistrationParameter();
}
@Override
public Observable createResourceAsync() {
RegistrationsInner client = this.manager().inner().registrations();
- this.createOrUpdateParameter.withLocation(Location.fromString(inner().location()));
- return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.createOrUpdateParameter)
- .map(new Func1() {
- @Override
- public RegistrationInner call(RegistrationInner resource) {
- resetCreateUpdateParameters();
- return resource;
- }
- })
+ return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.cregistrationToken)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
RegistrationsInner client = this.manager().inner().registrations();
- return client.updateAsync(this.resourceGroupName(), this.name(), this.createOrUpdateParameter)
- .map(new Func1() {
- @Override
- public RegistrationInner call(RegistrationInner resource) {
- resetCreateUpdateParameters();
- return resource;
- }
- })
+ return client.updateAsync(this.resourceGroupName(), this.name(), this.uregistrationToken)
.map(innerToFluentMap(this));
}
@@ -62,9 +44,6 @@ public boolean isInCreateMode() {
return this.inner().id() == null;
}
- private void resetCreateUpdateParameters() {
- this.createOrUpdateParameter = new RegistrationParameter();
- }
@Override
public String billingModel() {
@@ -88,7 +67,11 @@ public String objectId() {
@Override
public RegistrationImpl withRegistrationToken(String registrationToken) {
- this.createOrUpdateParameter.withRegistrationToken(registrationToken);
+ if (isInCreateMode()) {
+ this.cregistrationToken = registrationToken;
+ } else {
+ this.uregistrationToken = registrationToken;
+ }
return this;
}
diff --git a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationsInner.java b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationsInner.java
index 6dbab4f695fb..b53ad89b23c5 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationsInner.java
+++ b/sdk/azurestack/mgmt-v2017_06_01/src/main/java/com/microsoft/azure/management/azurestack/v2017_06_01/implementation/RegistrationsInner.java
@@ -13,7 +13,6 @@
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.azurestack.v2017_06_01.ErrorResponseException;
import com.microsoft.azure.management.azurestack.v2017_06_01.RegistrationParameter;
@@ -22,7 +21,6 @@
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;
@@ -81,11 +79,11 @@ interface RegistrationsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.Registrations createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}")
- Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Query("api-version") String apiVersion, @Body RegistrationParameter token, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegistrationParameter token, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.Registrations update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}")
- Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Query("api-version") String apiVersion, @Body RegistrationParameter token, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroup") String resourceGroup, @Path("registrationName") String registrationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegistrationParameter token, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azurestack.v2017_06_01.Registrations getActivationKey" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/getactivationkey")
@@ -389,14 +387,14 @@ private ServiceResponse deleteDelegate(Response response) th
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the RegistrationInner object if successful.
*/
- public RegistrationInner createOrUpdate(String resourceGroup, String registrationName, RegistrationParameter token) {
- return createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, token).toBlocking().single().body();
+ public RegistrationInner createOrUpdate(String resourceGroup, String registrationName, String registrationToken) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, registrationToken).toBlocking().single().body();
}
/**
@@ -404,13 +402,13 @@ public RegistrationInner createOrUpdate(String resourceGroup, String registratio
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @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 createOrUpdateAsync(String resourceGroup, String registrationName, RegistrationParameter token, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, token), serviceCallback);
+ public ServiceFuture createOrUpdateAsync(String resourceGroup, String registrationName, String registrationToken, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, registrationToken), serviceCallback);
}
/**
@@ -418,12 +416,12 @@ public ServiceFuture createOrUpdateAsync(String resourceGroup
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RegistrationInner object
*/
- public Observable createOrUpdateAsync(String resourceGroup, String registrationName, RegistrationParameter token) {
- return createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, token).map(new Func1, RegistrationInner>() {
+ public Observable createOrUpdateAsync(String resourceGroup, String registrationName, String registrationToken) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroup, registrationName, registrationToken).map(new Func1, RegistrationInner>() {
@Override
public RegistrationInner call(ServiceResponse response) {
return response.body();
@@ -436,11 +434,11 @@ public RegistrationInner call(ServiceResponse response) {
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RegistrationInner object
*/
- public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroup, String registrationName, RegistrationParameter token) {
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroup, String registrationName, String registrationToken) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -453,11 +451,12 @@ public Observable> createOrUpdateWithServiceR
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- if (token == null) {
- throw new IllegalArgumentException("Parameter token is required and cannot be null.");
+ if (registrationToken == null) {
+ throw new IllegalArgumentException("Parameter registrationToken is required and cannot be null.");
}
- Validator.validate(token);
- return service.createOrUpdate(this.client.subscriptionId(), resourceGroup, registrationName, this.client.apiVersion(), token, this.client.acceptLanguage(), this.client.userAgent())
+ RegistrationParameter token = new RegistrationParameter();
+ token.withRegistrationToken(registrationToken);
+ return service.createOrUpdate(this.client.subscriptionId(), resourceGroup, registrationName, this.client.apiVersion(), this.client.acceptLanguage(), token, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -471,11 +470,11 @@ public Observable> call(Response createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(201, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}
@@ -484,14 +483,14 @@ private ServiceResponse createOrUpdateDelegate(Response updateAsync(String resourceGroup, String registrationName, RegistrationParameter token, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroup, registrationName, token), serviceCallback);
+ public ServiceFuture updateAsync(String resourceGroup, String registrationName, String registrationToken, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroup, registrationName, registrationToken), serviceCallback);
}
/**
@@ -513,12 +512,12 @@ public ServiceFuture updateAsync(String resourceGroup, String
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RegistrationInner object
*/
- public Observable updateAsync(String resourceGroup, String registrationName, RegistrationParameter token) {
- return updateWithServiceResponseAsync(resourceGroup, registrationName, token).map(new Func1, RegistrationInner>() {
+ public Observable updateAsync(String resourceGroup, String registrationName, String registrationToken) {
+ return updateWithServiceResponseAsync(resourceGroup, registrationName, registrationToken).map(new Func1, RegistrationInner>() {
@Override
public RegistrationInner call(ServiceResponse response) {
return response.body();
@@ -531,11 +530,11 @@ public RegistrationInner call(ServiceResponse response) {
*
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
+ * @param registrationToken The token identifying registered Azure Stack
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RegistrationInner object
*/
- public Observable> updateWithServiceResponseAsync(String resourceGroup, String registrationName, RegistrationParameter token) {
+ public Observable> updateWithServiceResponseAsync(String resourceGroup, String registrationName, String registrationToken) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -548,11 +547,12 @@ public Observable> updateWithServiceResponseA
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- if (token == null) {
- throw new IllegalArgumentException("Parameter token is required and cannot be null.");
+ if (registrationToken == null) {
+ throw new IllegalArgumentException("Parameter registrationToken is required and cannot be null.");
}
- Validator.validate(token);
- return service.update(this.client.subscriptionId(), resourceGroup, registrationName, this.client.apiVersion(), token, this.client.acceptLanguage(), this.client.userAgent())
+ RegistrationParameter token = new RegistrationParameter();
+ token.withRegistrationToken(registrationToken);
+ return service.update(this.client.subscriptionId(), resourceGroup, registrationName, this.client.apiVersion(), this.client.acceptLanguage(), token, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -579,7 +579,7 @@ private ServiceResponse updateDelegate(Response
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
+ * @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ActivationKeyResultInner object if successful.
*/
@@ -652,10 +652,10 @@ public Observable> call(Response getActivationKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getActivationKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(CloudException.class)
+ .registerError(ErrorResponseException.class)
.build(response);
}