diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/CHANGELOG.md b/sdk/azurestack/azure-resourcemanager-azurestack/CHANGELOG.md
index 241b9efc07830..352b762a6d2b3 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/CHANGELOG.md
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-01-05)
+- Azure Resource Manager AzureStack client library for Java. This package contains Microsoft Azure SDK for AzureStack Management SDK. Azure Stack. Package tag package-preview-2020-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-12)
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/README.md b/sdk/azurestack/azure-resourcemanager-azurestack/README.md
index 81f5985377957..96a61d2280948 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/README.md
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-azurestack
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/azurestack/azure-resourcemanager-azurestack/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/SAMPLE.md b/sdk/azurestack/azure-resourcemanager-azurestack/SAMPLE.md
new file mode 100644
index 0000000000000..ad8b3234f6c26
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/SAMPLE.md
@@ -0,0 +1,696 @@
+# Code snippets and samples
+
+
+## CloudManifestFile
+
+- [Get](#cloudmanifestfile_get)
+- [List](#cloudmanifestfile_list)
+
+## CustomerSubscriptions
+
+- [Create](#customersubscriptions_create)
+- [Delete](#customersubscriptions_delete)
+- [Get](#customersubscriptions_get)
+- [List](#customersubscriptions_list)
+
+## LinkedSubscriptions
+
+- [CreateOrUpdate](#linkedsubscriptions_createorupdate)
+- [Delete](#linkedsubscriptions_delete)
+- [GetByResourceGroup](#linkedsubscriptions_getbyresourcegroup)
+- [List](#linkedsubscriptions_list)
+- [ListByResourceGroup](#linkedsubscriptions_listbyresourcegroup)
+- [Update](#linkedsubscriptions_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## Products
+
+- [Get](#products_get)
+- [GetProduct](#products_getproduct)
+- [GetProducts](#products_getproducts)
+- [List](#products_list)
+- [ListDetails](#products_listdetails)
+- [UploadLog](#products_uploadlog)
+
+## Registrations
+
+- [CreateOrUpdate](#registrations_createorupdate)
+- [Delete](#registrations_delete)
+- [EnableRemoteManagement](#registrations_enableremotemanagement)
+- [GetActivationKey](#registrations_getactivationkey)
+- [GetByResourceGroup](#registrations_getbyresourcegroup)
+- [List](#registrations_list)
+- [ListByResourceGroup](#registrations_listbyresourcegroup)
+- [Update](#registrations_update)
+### CloudManifestFile_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CloudManifestFile Get. */
+public final class CloudManifestFileGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CloudManifestFile/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of a cloud specific manifest file.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfACloudSpecificManifestFile(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.cloudManifestFiles().getWithResponse("latest", null, Context.NONE);
+ }
+}
+```
+
+### CloudManifestFile_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CloudManifestFile List. */
+public final class CloudManifestFileListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CloudManifestFile/List.json
+ */
+ /**
+ * Sample code: Returns the properties of a cloud specific manifest file with latest version.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfACloudSpecificManifestFileWithLatestVersion(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.cloudManifestFiles().listWithResponse(Context.NONE);
+ }
+}
+```
+
+### CustomerSubscriptions_Create
+
+```java
+/** Samples for CustomerSubscriptions Create. */
+public final class CustomerSubscriptionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Put.json
+ */
+ /**
+ * Sample code: Creates a new customer subscription under a registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createsANewCustomerSubscriptionUnderARegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .define("E09A4E93-29A7-4EBA-A6D4-76202383F07F")
+ .withExistingRegistration("azurestack", "testregistration")
+ .withTenantId("dbab3982-796f-4d03-9908-044c08aef8a2")
+ .create();
+ }
+}
+```
+
+### CustomerSubscriptions_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions Delete. */
+public final class CustomerSubscriptionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Delete.json
+ */
+ /**
+ * Sample code: Deletes a customer subscription under a registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deletesACustomerSubscriptionUnderARegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .deleteWithResponse("azurestack", "testregistration", "E09A4E93-29A7-4EBA-A6D4-76202383F07F", Context.NONE);
+ }
+}
+```
+
+### CustomerSubscriptions_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions Get. */
+public final class CustomerSubscriptionsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Get.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .getWithResponse("azurestack", "testregistration", "E09A4E93-29A7-4EBA-A6D4-76202383F07F", Context.NONE);
+ }
+}
+```
+
+### CustomerSubscriptions_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions List. */
+public final class CustomerSubscriptionsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/List.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.customerSubscriptions().list("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### LinkedSubscriptions_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestack.models.Location;
+
+/** Samples for LinkedSubscriptions CreateOrUpdate. */
+public final class LinkedSubscriptionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Put.json
+ */
+ /**
+ * Sample code: Create or update a Linked Subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createOrUpdateALinkedSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .linkedSubscriptions()
+ .define("testLinkedSubscription")
+ .withLocation(Location.fromString("eastus"))
+ .withExistingResourceGroup("azurestack")
+ .withLinkedSubscriptionId("104fbb77-2b0e-476a-83de-65ad8acd1f0b")
+ .withRegistrationResourceId(
+ "/subscriptions/dd8597b4-8739-4467-8b10-f8679f62bfbf/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/testRegistration")
+ .create();
+ }
+}
+```
+
+### LinkedSubscriptions_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions Delete. */
+public final class LinkedSubscriptionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Delete.json
+ */
+ /**
+ * Sample code: Delete the requested Linked Subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deleteTheRequestedLinkedSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().deleteWithResponse("azurestack", "testlinkedsubscription", Context.NONE);
+ }
+}
+```
+
+### LinkedSubscriptions_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions GetByResourceGroup. */
+public final class LinkedSubscriptionsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of a Linked Subscription resource.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfALinkedSubscriptionResource(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .linkedSubscriptions()
+ .getByResourceGroupWithResponse("azurestack", "testLinkedSubscription", Context.NONE);
+ }
+}
+```
+
+### LinkedSubscriptions_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions List. */
+public final class LinkedSubscriptionsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/ListBySubscription.json
+ */
+ /**
+ * Sample code: Returns a list of all linked subscriptions.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllLinkedSubscriptions(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().list(Context.NONE);
+ }
+}
+```
+
+### LinkedSubscriptions_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions ListByResourceGroup. */
+public final class LinkedSubscriptionsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/List.json
+ */
+ /**
+ * Sample code: Returns a list of all linked subscriptions.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllLinkedSubscriptions(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().listByResourceGroup("azurestack", Context.NONE);
+ }
+}
+```
+
+### LinkedSubscriptions_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestack.models.LinkedSubscription;
+
+/** Samples for LinkedSubscriptions Update. */
+public final class LinkedSubscriptionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Patch.json
+ */
+ /**
+ * Sample code: Patch a Linked Subscription resource.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void patchALinkedSubscriptionResource(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ LinkedSubscription resource =
+ manager
+ .linkedSubscriptions()
+ .getByResourceGroupWithResponse("azurestack", "testLinkedSubscription", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withLinkedSubscriptionId("104fbb77-2b0e-476a-83de-65ad8acd1f0b")
+ .withRegistrationResourceId(
+ "/subscriptions/dd8597b4-8739-4467-8b10-f8679f62bfbf/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/testRegistration")
+ .apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Operation/List.json
+ */
+ /**
+ * Sample code: Returns the list of supported REST operations.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheListOfSupportedRESTOperations(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### Products_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products Get. */
+public final class ProductsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/Get.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .getWithResponse(
+ "azurestack", "testregistration", "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1", Context.NONE);
+ }
+}
+```
+
+### Products_GetProduct
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products GetProduct. */
+public final class ProductsGetProductSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/GetPost.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .getProductWithResponse(
+ "azurestack",
+ "testregistration",
+ "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### Products_GetProducts
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products GetProducts. */
+public final class ProductsGetProductsSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/ListPost.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.products().getProductsWithResponse("azurestack", "testregistration", "_all", null, Context.NONE);
+ }
+}
+```
+
+### Products_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products List. */
+public final class ProductsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/List.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.products().list("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### Products_ListDetails
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products ListDetails. */
+public final class ProductsListDetailsSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/Post.json
+ */
+ /**
+ * Sample code: Returns the extended properties of a product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheExtendedPropertiesOfAProduct(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .listDetailsWithResponse(
+ "azurestack", "testregistration", "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1", Context.NONE);
+ }
+}
+```
+
+### Products_UploadLog
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Products UploadLog. */
+public final class ProductsUploadLogSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/UploadLog.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .uploadLogWithResponse(
+ "azurestack",
+ "testregistration",
+ "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### Registrations_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestack.models.Location;
+
+/** Samples for Registrations CreateOrUpdate. */
+public final class RegistrationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Put.json
+ */
+ /**
+ * Sample code: Create or update an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createOrUpdateAnAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .registrations()
+ .define("testregistration")
+ .withLocation(Location.GLOBAL)
+ .withExistingResourceGroup("azurestack")
+ .withRegistrationToken(
+ "EyjIAWXSAw5nTw9KZWWiOiJeZxZlbg9wBwvUdCiSIM9iaMVjdeLkijoinwIzyJa2Ytgtowm2yy00OdG4lTlLyJmtztHjZGfJZTC0NZK1iIWiY2XvdWRJzCi6iJy5nDy0oDk1LTNHmWeTnDUwyS05oDI0LTrINzYwoGq5mjAzziIsim1HCmtldHBsYwnLu3LuZGljYXrpB25FBmfIbgVkIJp0CNvLLCJOYXJkd2FYzuLUZM8iOlt7IM51bunvcMVZiJoYlCjcaw9ZiJPBIjNkzDJHmda3yte5ndqZMdq4YmZkZmi5oDM3OTY3ZwNMIL0SIM5PyYI6WyJLZTy0ztJJMwZKy2m0OWNLODDLMwm2zTm0ymzKyjmWySisiJA3njlHmtdlY2q4NjRjnwFIZtC1YZi5ZGyZodM3Y2vjIl0siMnwDsi6wyi2oDUZoTbiY2RhNDa0ymrKoWe4YtK5otblzWrJzGyzNCISIjmYnzC4M2vmnZdIoDRKM2i5ytfkmJlhnDc1zdhLzWm1il0sim5HBwuiOijIqzF1MTvhmDIXmIIsimrpc2SiolsioWNlZjVhnZM1otQ0nDu3NmjlN2M3zmfjzmyZMTJhZtiiLcjLZjLmmZJhmWVhytG0NTu0OTqZNWu1Mda0MZbIYtfjyijdLCj1DWlKijoinwM5Mwu3NjytMju5Os00oTIwlWi0OdmTnGzHotiWm2RjyTCxIIwiBWvTb3J5ijPbijAYZDA3M2fjNzu0YTRMZTfhodkxzDnkogY5ZtAWzdyXIiwINZcWzThLnDQ4otrJndAzZGI5MGzlYtY1ZJA5ZdfiNMQIXX1DlcJpC3n1zxiiOijZb21lB25LIIWIdmVyC2LVbiI6IJeuMcJ9")
+ .create();
+ }
+}
+```
+
+### Registrations_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations Delete. */
+public final class RegistrationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Delete.json
+ */
+ /**
+ * Sample code: Delete the requested Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deleteTheRequestedAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().deleteWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### Registrations_EnableRemoteManagement
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations EnableRemoteManagement. */
+public final class RegistrationsEnableRemoteManagementSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/RemoteManagement/Post.json
+ */
+ /**
+ * Sample code: Returns empty response for successful action..
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsEmptyResponseForSuccessfulAction(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().enableRemoteManagementWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### Registrations_GetActivationKey
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations GetActivationKey. */
+public final class RegistrationsGetActivationKeySamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Post.json
+ */
+ /**
+ * Sample code: Returns Azure Stack Activation Key.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAzureStackActivationKey(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().getActivationKeyWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### Registrations_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations GetByResourceGroup. */
+public final class RegistrationsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfAnAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().getByResourceGroupWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
+```
+
+### Registrations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations List. */
+public final class RegistrationsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/ListBySubscription.json
+ */
+ /**
+ * Sample code: Returns a list of all registrations under current subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllRegistrationsUnderCurrentSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().list(Context.NONE);
+ }
+}
+```
+
+### Registrations_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Registrations ListByResourceGroup. */
+public final class RegistrationsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/List.json
+ */
+ /**
+ * Sample code: Returns a list of all registrations.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllRegistrations(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().listByResourceGroup("azurestack", Context.NONE);
+ }
+}
+```
+
+### Registrations_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestack.models.Registration;
+
+/** Samples for Registrations Update. */
+public final class RegistrationsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Patch.json
+ */
+ /**
+ * Sample code: Patch an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void patchAnAzureStackRegistration(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ Registration resource =
+ manager
+ .registrations()
+ .getByResourceGroupWithResponse("azurestack", "testregistration", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withRegistrationToken(
+ "EyjIAWXSAw5nTw9KZWWiOiJeZxZlbg9wBwvUdCiSIM9iaMVjdeLkijoinwIzyJa2Ytgtowm2yy00OdG4lTlLyJmtztHjZGfJZTC0NZK1iIWiY2XvdWRJzCi6iJy5nDy0oDk1LTNHmWeTnDUwyS05oDI0LTrINzYwoGq5mjAzziIsim1HCmtldHBsYwnLu3LuZGljYXrpB25FBmfIbgVkIJp0CNvLLCJOYXJkd2FYzuLUZM8iOlt7IM51bunvcMVZiJoYlCjcaw9ZiJPBIjNkzDJHmda3yte5ndqZMdq4YmZkZmi5oDM3OTY3ZwNMIL0SIM5PyYI6WyJLZTy0ztJJMwZKy2m0OWNLODDLMwm2zTm0ymzKyjmWySisiJA3njlHmtdlY2q4NjRjnwFIZtC1YZi5ZGyZodM3Y2vjIl0siMnwDsi6wyi2oDUZoTbiY2RhNDa0ymrKoWe4YtK5otblzWrJzGyzNCISIjmYnzC4M2vmnZdIoDRKM2i5ytfkmJlhnDc1zdhLzWm1il0sim5HBwuiOijIqzF1MTvhmDIXmIIsimrpc2SiolsioWNlZjVhnZM1otQ0nDu3NmjlN2M3zmfjzmyZMTJhZtiiLcjLZjLmmZJhmWVhytG0NTu0OTqZNWu1Mda0MZbIYtfjyijdLCj1DWlKijoinwM5Mwu3NjytMju5Os00oTIwlWi0OdmTnGzHotiWm2RjyTCxIIwiBWvTb3J5ijPbijAYZDA3M2fjNzu0YTRMZTfhodkxzDnkogY5ZtAWzdyXIiwINZcWzThLnDQ4otrJndAzZGI5MGzlYtY1ZJA5ZdfiNMQIXX1DlcJpC3n1zxiiOijZb21lB25LIIWIdmVyC2LVbiI6IJeuMcJ9")
+ .apply();
+ }
+}
+```
+
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
index e8ae6db4e6689..243b4ce9456f5 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
@@ -1,58 +1,81 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-azurestack
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-azurestack
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for AzureStack Management
- This package contains Microsoft Azure SDK for AzureStack Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack. Package tag package-preview-2020-06.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for AzureStack Management
+ This package contains Microsoft Azure SDK for AzureStack Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack. Package tag package-preview-2020-06.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
false
-
-
-
- com.azure
- azure-core
- 1.23.1
-
-
- com.azure
- azure-core-management
- 1.4.4
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/AzureStackManager.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/AzureStackManager.java
index 8b7b19d4825a6..2afdb5483220a 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/AzureStackManager.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/AzureStackManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -39,6 +40,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to AzureStackManager. Azure Stack. */
public final class AzureStackManager {
@@ -97,6 +99,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -136,6 +139,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -192,20 +206,33 @@ public AzureStackManager authenticate(TokenCredential credential, AzureProfile p
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/RegistrationsClient.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/RegistrationsClient.java
index 062a41d3d102d..7f444d711da37 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/RegistrationsClient.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/RegistrationsClient.java
@@ -40,6 +40,28 @@ public interface RegistrationsClient {
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroup, Context context);
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
/**
* Returns the properties of an Azure Stack registration.
*
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CloudManifestFileEnvironmentEndpoints.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CloudManifestFileEnvironmentEndpoints.java
new file mode 100644
index 0000000000000..bf834b9f48287
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CloudManifestFileEnvironmentEndpoints.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cloud specific environment endpoints for AzureStack deployment. */
+@Fluent
+public final class CloudManifestFileEnvironmentEndpoints {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudManifestFileEnvironmentEndpoints.class);
+
+ /*
+ * ARM endpoint.
+ */
+ @JsonProperty(value = "customCloudArmEndpoint")
+ private String customCloudArmEndpoint;
+
+ /*
+ * Dsms endpoint.
+ */
+ @JsonProperty(value = "externalDsmsEndpoint")
+ private String externalDsmsEndpoint;
+
+ /**
+ * Get the customCloudArmEndpoint property: ARM endpoint.
+ *
+ * @return the customCloudArmEndpoint value.
+ */
+ public String customCloudArmEndpoint() {
+ return this.customCloudArmEndpoint;
+ }
+
+ /**
+ * Set the customCloudArmEndpoint property: ARM endpoint.
+ *
+ * @param customCloudArmEndpoint the customCloudArmEndpoint value to set.
+ * @return the CloudManifestFileEnvironmentEndpoints object itself.
+ */
+ public CloudManifestFileEnvironmentEndpoints withCustomCloudArmEndpoint(String customCloudArmEndpoint) {
+ this.customCloudArmEndpoint = customCloudArmEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the externalDsmsEndpoint property: Dsms endpoint.
+ *
+ * @return the externalDsmsEndpoint value.
+ */
+ public String externalDsmsEndpoint() {
+ return this.externalDsmsEndpoint;
+ }
+
+ /**
+ * Set the externalDsmsEndpoint property: Dsms endpoint.
+ *
+ * @param externalDsmsEndpoint the externalDsmsEndpoint value to set.
+ * @return the CloudManifestFileEnvironmentEndpoints object itself.
+ */
+ public CloudManifestFileEnvironmentEndpoints withExternalDsmsEndpoint(String externalDsmsEndpoint) {
+ this.externalDsmsEndpoint = externalDsmsEndpoint;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionInner.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionInner.java
index 22838f76b4112..93389f1b255e8 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionInner.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -13,22 +12,21 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/** Customer subscription. */
-@JsonFlatten
@Fluent
-public class CustomerSubscriptionInner extends ProxyResource {
+public final class CustomerSubscriptionInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerSubscriptionInner.class);
/*
- * Metadata pertaining to creation and last modification of the resource.
+ * Customer subscription properties.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ @JsonProperty(value = "properties")
+ private CustomerSubscriptionProperties innerProperties;
/*
- * Tenant Id.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.tenantId")
- private String tenantId;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/*
* The entity tag used for optimistic concurrency when modifying the
@@ -37,6 +35,15 @@ public class CustomerSubscriptionInner extends ProxyResource {
@JsonProperty(value = "etag")
private String etag;
+ /**
+ * Get the innerProperties property: Customer subscription properties.
+ *
+ * @return the innerProperties value.
+ */
+ private CustomerSubscriptionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
@@ -47,42 +54,45 @@ public SystemData systemData() {
}
/**
- * Get the tenantId property: Tenant Id.
+ * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
*
- * @return the tenantId value.
+ * @return the etag value.
*/
- public String tenantId() {
- return this.tenantId;
+ public String etag() {
+ return this.etag;
}
/**
- * Set the tenantId property: Tenant Id.
+ * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
*
- * @param tenantId the tenantId value to set.
+ * @param etag the etag value to set.
* @return the CustomerSubscriptionInner object itself.
*/
- public CustomerSubscriptionInner withTenantId(String tenantId) {
- this.tenantId = tenantId;
+ public CustomerSubscriptionInner withEtag(String etag) {
+ this.etag = etag;
return this;
}
/**
- * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ * Get the tenantId property: Tenant Id.
*
- * @return the etag value.
+ * @return the tenantId value.
*/
- public String etag() {
- return this.etag;
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
}
/**
- * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ * Set the tenantId property: Tenant Id.
*
- * @param etag the etag value to set.
+ * @param tenantId the tenantId value to set.
* @return the CustomerSubscriptionInner object itself.
*/
- public CustomerSubscriptionInner withEtag(String etag) {
- this.etag = etag;
+ public CustomerSubscriptionInner withTenantId(String tenantId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CustomerSubscriptionProperties();
+ }
+ this.innerProperties().withTenantId(tenantId);
return this;
}
@@ -92,5 +102,8 @@ public CustomerSubscriptionInner withEtag(String etag) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionProperties.java
new file mode 100644
index 0000000000000..44e7af83918c6
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/CustomerSubscriptionProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Customer subscription properties. */
+@Fluent
+public final class CustomerSubscriptionProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomerSubscriptionProperties.class);
+
+ /*
+ * Tenant Id.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /**
+ * Get the tenantId property: Tenant Id.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: Tenant Id.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the CustomerSubscriptionProperties object itself.
+ */
+ public CustomerSubscriptionProperties withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductInner.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductInner.java
index c6b72a8bd3921..870ec8f5996c7 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductInner.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurestack.models.ComputeRole;
import com.azure.resourcemanager.azurestack.models.DataDiskImage;
@@ -16,9 +15,8 @@
import java.util.List;
/** Extended description about the product required for installing it into Azure Stack. */
-@JsonFlatten
@Immutable
-public class ExtendedProductInner {
+public final class ExtendedProductInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedProductInner.class);
/*
@@ -36,65 +34,10 @@ public class ExtendedProductInner {
private String productKind;
/*
- * Specifies kind of compute role included in the package.
+ * Specifies additional properties describing the product.
*/
- @JsonProperty(value = "properties.computeRole", access = JsonProperty.Access.WRITE_ONLY)
- private ComputeRole computeRole;
-
- /*
- * Specifies if product is a Virtual Machine Extension.
- */
- @JsonProperty(value = "properties.isSystemExtension", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isSystemExtension;
-
- /*
- * Indicates if specified product supports multiple extensions.
- */
- @JsonProperty(value = "properties.supportMultipleExtensions", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean supportMultipleExtensions;
-
- /*
- * Specifies product version.
- */
- @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY)
- private String versionPropertiesVersion;
-
- /*
- * Specifies operating system used by the product.
- */
- @JsonProperty(value = "properties.vmOsType", access = JsonProperty.Access.WRITE_ONLY)
- private OperatingSystem vmOsType;
-
- /*
- * Indicates if virtual machine Scale Set is enabled in the specified
- * product.
- */
- @JsonProperty(value = "properties.vmScaleSetEnabled", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean vmScaleSetEnabled;
-
- /*
- * The URI.
- */
- @JsonProperty(value = "properties.sourceBlob.uri", access = JsonProperty.Access.WRITE_ONLY)
- private String uri;
-
- /*
- * Specifies product version.
- */
- @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY)
- private String version;
-
- /*
- * OS disk image used by product.
- */
- @JsonProperty(value = "properties.osDiskImage", access = JsonProperty.Access.WRITE_ONLY)
- private OsDiskImage osDiskImage;
-
- /*
- * List of attached data disks.
- */
- @JsonProperty(value = "properties.dataDiskImages", access = JsonProperty.Access.WRITE_ONLY)
- private List dataDiskImages;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private ExtendedProductProperties innerProperties;
/**
* Get the galleryPackageBlobSasUri property: The URI to the .azpkg file that provides information required for
@@ -116,57 +59,57 @@ public String productKind() {
}
/**
- * Get the computeRole property: Specifies kind of compute role included in the package.
+ * Get the innerProperties property: Specifies additional properties describing the product.
*
- * @return the computeRole value.
+ * @return the innerProperties value.
*/
- public ComputeRole computeRole() {
- return this.computeRole;
+ private ExtendedProductProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Get the isSystemExtension property: Specifies if product is a Virtual Machine Extension.
+ * Get the version property: Specifies product version.
*
- * @return the isSystemExtension value.
+ * @return the version value.
*/
- public Boolean isSystemExtension() {
- return this.isSystemExtension;
+ public String version() {
+ return this.innerProperties() == null ? null : this.innerProperties().version();
}
/**
- * Get the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
+ * Get the osDiskImage property: OS disk image used by product.
*
- * @return the supportMultipleExtensions value.
+ * @return the osDiskImage value.
*/
- public Boolean supportMultipleExtensions() {
- return this.supportMultipleExtensions;
+ public OsDiskImage osDiskImage() {
+ return this.innerProperties() == null ? null : this.innerProperties().osDiskImage();
}
/**
- * Get the versionPropertiesVersion property: Specifies product version.
+ * Get the dataDiskImages property: List of attached data disks.
*
- * @return the versionPropertiesVersion value.
+ * @return the dataDiskImages value.
*/
- public String versionPropertiesVersion() {
- return this.versionPropertiesVersion;
+ public List dataDiskImages() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataDiskImages();
}
/**
- * Get the vmOsType property: Specifies operating system used by the product.
+ * Get the computeRole property: Specifies kind of compute role included in the package.
*
- * @return the vmOsType value.
+ * @return the computeRole value.
*/
- public OperatingSystem vmOsType() {
- return this.vmOsType;
+ public ComputeRole computeRole() {
+ return this.innerProperties() == null ? null : this.innerProperties().computeRole();
}
/**
- * Get the vmScaleSetEnabled property: Indicates if virtual machine Scale Set is enabled in the specified product.
+ * Get the isSystemExtension property: Specifies if product is a Virtual Machine Extension.
*
- * @return the vmScaleSetEnabled value.
+ * @return the isSystemExtension value.
*/
- public Boolean vmScaleSetEnabled() {
- return this.vmScaleSetEnabled;
+ public Boolean isSystemExtension() {
+ return this.innerProperties() == null ? null : this.innerProperties().isSystemExtension();
}
/**
@@ -175,34 +118,34 @@ public Boolean vmScaleSetEnabled() {
* @return the uri value.
*/
public String uri() {
- return this.uri;
+ return this.innerProperties() == null ? null : this.innerProperties().uri();
}
/**
- * Get the version property: Specifies product version.
+ * Get the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
*
- * @return the version value.
+ * @return the supportMultipleExtensions value.
*/
- public String version() {
- return this.version;
+ public Boolean supportMultipleExtensions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportMultipleExtensions();
}
/**
- * Get the osDiskImage property: OS disk image used by product.
+ * Get the vmOsType property: Specifies operating system used by the product.
*
- * @return the osDiskImage value.
+ * @return the vmOsType value.
*/
- public OsDiskImage osDiskImage() {
- return this.osDiskImage;
+ public OperatingSystem vmOsType() {
+ return this.innerProperties() == null ? null : this.innerProperties().vmOsType();
}
/**
- * Get the dataDiskImages property: List of attached data disks.
+ * Get the vmScaleSetEnabled property: Indicates if virtual machine Scale Set is enabled in the specified product.
*
- * @return the dataDiskImages value.
+ * @return the vmScaleSetEnabled value.
*/
- public List dataDiskImages() {
- return this.dataDiskImages;
+ public Boolean vmScaleSetEnabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().vmScaleSetEnabled();
}
/**
@@ -211,11 +154,8 @@ public List dataDiskImages() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (osDiskImage() != null) {
- osDiskImage().validate();
- }
- if (dataDiskImages() != null) {
- dataDiskImages().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProductProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductProperties.java
similarity index 88%
rename from sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProductProperties.java
rename to sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductProperties.java
index 06febb9f96722..b3513a01ede39 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProductProperties.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ExtendedProductProperties.java
@@ -2,10 +2,13 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.azurestack.models;
+package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.models.DataDiskImage;
+import com.azure.resourcemanager.azurestack.models.OsDiskImage;
+import com.azure.resourcemanager.azurestack.models.VirtualMachineExtensionProductProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionInner.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionInner.java
index c7e7ee06b6521..4df783d41d661 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionInner.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -14,74 +13,95 @@
import java.util.Map;
/** Linked Subscription information. */
-@JsonFlatten
@Fluent
-public class LinkedSubscriptionInner extends Resource {
+public final class LinkedSubscriptionInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedSubscriptionInner.class);
/*
- * The identifier associated with the device subscription.
+ * Linked Subscription resource.
*/
- @JsonProperty(value = "properties.linkedSubscriptionId")
- private String linkedSubscriptionId;
+ @JsonProperty(value = "properties")
+ private LinkedSubscriptionProperties innerProperties;
/*
- * The identifier associated with the device registration.
+ * The kind of the resource.
*/
- @JsonProperty(value = "properties.registrationResourceId")
- private String registrationResourceId;
+ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
/*
- * The identifier of the Azure Stack device for remote management.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.deviceId", access = JsonProperty.Access.WRITE_ONLY)
- private String deviceId;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/*
- * The object identifier associated with the Azure Stack device connecting
- * to Azure.
+ * The entity tag used for optimistic concurrency when modifying the
+ * resource.
*/
- @JsonProperty(value = "properties.deviceObjectId", access = JsonProperty.Access.WRITE_ONLY)
- private String deviceObjectId;
+ @JsonProperty(value = "etag")
+ private String etag;
- /*
- * The connection state of the Azure Stack device.
+ /**
+ * Get the innerProperties property: Linked Subscription resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.deviceLinkState", access = JsonProperty.Access.WRITE_ONLY)
- private String deviceLinkState;
+ private LinkedSubscriptionProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * The last remote management connection time for the Azure Stack device
- * connected to the linked subscription resource.
+ /**
+ * Get the kind property: The kind of the resource.
+ *
+ * @return the kind value.
*/
- @JsonProperty(value = "properties.lastConnectedTime", access = JsonProperty.Access.WRITE_ONLY)
- private String lastConnectedTime;
+ public String kind() {
+ return this.kind;
+ }
- /*
- * The status of the remote management connection of the Azure Stack
- * device.
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
*/
- @JsonProperty(value = "properties.deviceConnectionStatus", access = JsonProperty.Access.WRITE_ONLY)
- private String deviceConnectionStatus;
+ public SystemData systemData() {
+ return this.systemData;
+ }
- /*
- * The kind of the resource.
+ /**
+ * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @return the etag value.
*/
- @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
- private String kind;
+ public String etag() {
+ return this.etag;
+ }
- /*
- * Metadata pertaining to creation and last modification of the resource.
+ /**
+ * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @param etag the etag value to set.
+ * @return the LinkedSubscriptionInner object itself.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ public LinkedSubscriptionInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
- /*
- * The entity tag used for optimistic concurrency when modifying the
- * resource.
- */
- @JsonProperty(value = "etag")
- private String etag;
+ /** {@inheritDoc} */
+ @Override
+ public LinkedSubscriptionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public LinkedSubscriptionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the linkedSubscriptionId property: The identifier associated with the device subscription.
@@ -89,7 +109,7 @@ public class LinkedSubscriptionInner extends Resource {
* @return the linkedSubscriptionId value.
*/
public String linkedSubscriptionId() {
- return this.linkedSubscriptionId;
+ return this.innerProperties() == null ? null : this.innerProperties().linkedSubscriptionId();
}
/**
@@ -99,7 +119,10 @@ public String linkedSubscriptionId() {
* @return the LinkedSubscriptionInner object itself.
*/
public LinkedSubscriptionInner withLinkedSubscriptionId(String linkedSubscriptionId) {
- this.linkedSubscriptionId = linkedSubscriptionId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedSubscriptionProperties();
+ }
+ this.innerProperties().withLinkedSubscriptionId(linkedSubscriptionId);
return this;
}
@@ -109,7 +132,7 @@ public LinkedSubscriptionInner withLinkedSubscriptionId(String linkedSubscriptio
* @return the registrationResourceId value.
*/
public String registrationResourceId() {
- return this.registrationResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().registrationResourceId();
}
/**
@@ -119,7 +142,10 @@ public String registrationResourceId() {
* @return the LinkedSubscriptionInner object itself.
*/
public LinkedSubscriptionInner withRegistrationResourceId(String registrationResourceId) {
- this.registrationResourceId = registrationResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedSubscriptionProperties();
+ }
+ this.innerProperties().withRegistrationResourceId(registrationResourceId);
return this;
}
@@ -129,7 +155,7 @@ public LinkedSubscriptionInner withRegistrationResourceId(String registrationRes
* @return the deviceId value.
*/
public String deviceId() {
- return this.deviceId;
+ return this.innerProperties() == null ? null : this.innerProperties().deviceId();
}
/**
@@ -139,7 +165,7 @@ public String deviceId() {
* @return the deviceObjectId value.
*/
public String deviceObjectId() {
- return this.deviceObjectId;
+ return this.innerProperties() == null ? null : this.innerProperties().deviceObjectId();
}
/**
@@ -148,7 +174,7 @@ public String deviceObjectId() {
* @return the deviceLinkState value.
*/
public String deviceLinkState() {
- return this.deviceLinkState;
+ return this.innerProperties() == null ? null : this.innerProperties().deviceLinkState();
}
/**
@@ -158,7 +184,7 @@ public String deviceLinkState() {
* @return the lastConnectedTime value.
*/
public String lastConnectedTime() {
- return this.lastConnectedTime;
+ return this.innerProperties() == null ? null : this.innerProperties().lastConnectedTime();
}
/**
@@ -168,59 +194,7 @@ public String lastConnectedTime() {
* @return the deviceConnectionStatus value.
*/
public String deviceConnectionStatus() {
- return this.deviceConnectionStatus;
- }
-
- /**
- * Get the kind property: The kind of the resource.
- *
- * @return the kind value.
- */
- public String kind() {
- return this.kind;
- }
-
- /**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @return the etag value.
- */
- public String etag() {
- return this.etag;
- }
-
- /**
- * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @param etag the etag value to set.
- * @return the LinkedSubscriptionInner object itself.
- */
- public LinkedSubscriptionInner withEtag(String etag) {
- this.etag = etag;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public LinkedSubscriptionInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public LinkedSubscriptionInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().deviceConnectionStatus();
}
/**
@@ -229,5 +203,8 @@ public LinkedSubscriptionInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionParameterProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionParameterProperties.java
new file mode 100644
index 0000000000000..18d9e04900506
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionParameterProperties.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the Linked Subscription resource. */
+@Fluent
+public final class LinkedSubscriptionParameterProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedSubscriptionParameterProperties.class);
+
+ /*
+ * The identifier associated with the device subscription.
+ */
+ @JsonProperty(value = "linkedSubscriptionId", required = true)
+ private String linkedSubscriptionId;
+
+ /*
+ * The identifier associated with the device registration.
+ */
+ @JsonProperty(value = "registrationResourceId", required = true)
+ private String registrationResourceId;
+
+ /**
+ * Get the linkedSubscriptionId property: The identifier associated with the device subscription.
+ *
+ * @return the linkedSubscriptionId value.
+ */
+ public String linkedSubscriptionId() {
+ return this.linkedSubscriptionId;
+ }
+
+ /**
+ * Set the linkedSubscriptionId property: The identifier associated with the device subscription.
+ *
+ * @param linkedSubscriptionId the linkedSubscriptionId value to set.
+ * @return the LinkedSubscriptionParameterProperties object itself.
+ */
+ public LinkedSubscriptionParameterProperties withLinkedSubscriptionId(String linkedSubscriptionId) {
+ this.linkedSubscriptionId = linkedSubscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the registrationResourceId property: The identifier associated with the device registration.
+ *
+ * @return the registrationResourceId value.
+ */
+ public String registrationResourceId() {
+ return this.registrationResourceId;
+ }
+
+ /**
+ * Set the registrationResourceId property: The identifier associated with the device registration.
+ *
+ * @param registrationResourceId the registrationResourceId value to set.
+ * @return the LinkedSubscriptionParameterProperties object itself.
+ */
+ public LinkedSubscriptionParameterProperties withRegistrationResourceId(String registrationResourceId) {
+ this.registrationResourceId = registrationResourceId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (linkedSubscriptionId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property linkedSubscriptionId in model"
+ + " LinkedSubscriptionParameterProperties"));
+ }
+ if (registrationResourceId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property registrationResourceId in model"
+ + " LinkedSubscriptionParameterProperties"));
+ }
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionProperties.java
new file mode 100644
index 0000000000000..fb9d342078243
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/LinkedSubscriptionProperties.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties portion of the linked subscription resource. */
+@Fluent
+public final class LinkedSubscriptionProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedSubscriptionProperties.class);
+
+ /*
+ * The identifier associated with the device subscription.
+ */
+ @JsonProperty(value = "linkedSubscriptionId")
+ private String linkedSubscriptionId;
+
+ /*
+ * The identifier associated with the device registration.
+ */
+ @JsonProperty(value = "registrationResourceId")
+ private String registrationResourceId;
+
+ /*
+ * The identifier of the Azure Stack device for remote management.
+ */
+ @JsonProperty(value = "deviceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String deviceId;
+
+ /*
+ * The object identifier associated with the Azure Stack device connecting
+ * to Azure.
+ */
+ @JsonProperty(value = "deviceObjectId", access = JsonProperty.Access.WRITE_ONLY)
+ private String deviceObjectId;
+
+ /*
+ * The connection state of the Azure Stack device.
+ */
+ @JsonProperty(value = "deviceLinkState", access = JsonProperty.Access.WRITE_ONLY)
+ private String deviceLinkState;
+
+ /*
+ * The last remote management connection time for the Azure Stack device
+ * connected to the linked subscription resource.
+ */
+ @JsonProperty(value = "lastConnectedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastConnectedTime;
+
+ /*
+ * The status of the remote management connection of the Azure Stack
+ * device.
+ */
+ @JsonProperty(value = "deviceConnectionStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private String deviceConnectionStatus;
+
+ /**
+ * Get the linkedSubscriptionId property: The identifier associated with the device subscription.
+ *
+ * @return the linkedSubscriptionId value.
+ */
+ public String linkedSubscriptionId() {
+ return this.linkedSubscriptionId;
+ }
+
+ /**
+ * Set the linkedSubscriptionId property: The identifier associated with the device subscription.
+ *
+ * @param linkedSubscriptionId the linkedSubscriptionId value to set.
+ * @return the LinkedSubscriptionProperties object itself.
+ */
+ public LinkedSubscriptionProperties withLinkedSubscriptionId(String linkedSubscriptionId) {
+ this.linkedSubscriptionId = linkedSubscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the registrationResourceId property: The identifier associated with the device registration.
+ *
+ * @return the registrationResourceId value.
+ */
+ public String registrationResourceId() {
+ return this.registrationResourceId;
+ }
+
+ /**
+ * Set the registrationResourceId property: The identifier associated with the device registration.
+ *
+ * @param registrationResourceId the registrationResourceId value to set.
+ * @return the LinkedSubscriptionProperties object itself.
+ */
+ public LinkedSubscriptionProperties withRegistrationResourceId(String registrationResourceId) {
+ this.registrationResourceId = registrationResourceId;
+ return this;
+ }
+
+ /**
+ * Get the deviceId property: The identifier of the Azure Stack device for remote management.
+ *
+ * @return the deviceId value.
+ */
+ public String deviceId() {
+ return this.deviceId;
+ }
+
+ /**
+ * Get the deviceObjectId property: The object identifier associated with the Azure Stack device connecting to
+ * Azure.
+ *
+ * @return the deviceObjectId value.
+ */
+ public String deviceObjectId() {
+ return this.deviceObjectId;
+ }
+
+ /**
+ * Get the deviceLinkState property: The connection state of the Azure Stack device.
+ *
+ * @return the deviceLinkState value.
+ */
+ public String deviceLinkState() {
+ return this.deviceLinkState;
+ }
+
+ /**
+ * Get the lastConnectedTime property: The last remote management connection time for the Azure Stack device
+ * connected to the linked subscription resource.
+ *
+ * @return the lastConnectedTime value.
+ */
+ public String lastConnectedTime() {
+ return this.lastConnectedTime;
+ }
+
+ /**
+ * Get the deviceConnectionStatus property: The status of the remote management connection of the Azure Stack
+ * device.
+ *
+ * @return the deviceConnectionStatus value.
+ */
+ public String deviceConnectionStatus() {
+ return this.deviceConnectionStatus;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductInner.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductInner.java
index 69af83ff6b5e6..921d6d83ef3cd 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductInner.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -18,124 +17,21 @@
import java.util.List;
/** Product information. */
-@JsonFlatten
@Fluent
-public class ProductInner extends ProxyResource {
+public final class ProductInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ProductInner.class);
/*
- * Metadata pertaining to creation and last modification of the resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
- /*
- * The display name of the product.
- */
- @JsonProperty(value = "properties.displayName")
- private String displayName;
-
- /*
- * The description of the product.
- */
- @JsonProperty(value = "properties.description")
- private String description;
-
- /*
- * The user-friendly name of the product publisher.
- */
- @JsonProperty(value = "properties.publisherDisplayName")
- private String publisherDisplayName;
-
- /*
- * Publisher identifier.
- */
- @JsonProperty(value = "properties.publisherIdentifier")
- private String publisherIdentifier;
-
- /*
- * The offer representing the product.
- */
- @JsonProperty(value = "properties.offer")
- private String offer;
-
- /*
- * The version of the product offer.
- */
- @JsonProperty(value = "properties.offerVersion")
- private String offerVersion;
-
- /*
- * The product SKU.
- */
- @JsonProperty(value = "properties.sku")
- private String sku;
-
- /*
- * The part number used for billing purposes.
- */
- @JsonProperty(value = "properties.billingPartNumber")
- private String billingPartNumber;
-
- /*
- * The type of the Virtual Machine Extension.
- */
- @JsonProperty(value = "properties.vmExtensionType")
- private String vmExtensionType;
-
- /*
- * The identifier of the gallery item corresponding to the product.
- */
- @JsonProperty(value = "properties.galleryItemIdentity")
- private String galleryItemIdentity;
-
- /*
- * Additional links available for this product.
- */
- @JsonProperty(value = "properties.iconUris")
- private IconUris iconUris;
-
- /*
- * Additional links available for this product.
+ * Properties of the product resource.
*/
- @JsonProperty(value = "properties.links")
- private List links;
+ @JsonProperty(value = "properties")
+ private ProductNestedProperties innerProperties;
/*
- * The legal terms.
- */
- @JsonProperty(value = "properties.legalTerms")
- private String legalTerms;
-
- /*
- * The privacy policy.
- */
- @JsonProperty(value = "properties.privacyPolicy")
- private String privacyPolicy;
-
- /*
- * The length of product content.
- */
- @JsonProperty(value = "properties.payloadLength")
- private Long payloadLength;
-
- /*
- * The kind of the product (virtualMachine or virtualMachineExtension)
- */
- @JsonProperty(value = "properties.productKind")
- private String productKind;
-
- /*
- * Additional properties for the product.
- */
- @JsonProperty(value = "properties.productProperties")
- private ProductProperties productProperties;
-
- /*
- * Product compatibility with current device.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.compatibility")
- private Compatibility compatibility;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/*
* The entity tag used for optimistic concurrency when modifying the
@@ -144,6 +40,15 @@ public class ProductInner extends ProxyResource {
@JsonProperty(value = "etag")
private String etag;
+ /**
+ * Get the innerProperties property: Properties of the product resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ProductNestedProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
@@ -153,13 +58,33 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @param etag the etag value to set.
+ * @return the ProductInner object itself.
+ */
+ public ProductInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
/**
* Get the displayName property: The display name of the product.
*
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -169,7 +94,10 @@ public String displayName() {
* @return the ProductInner object itself.
*/
public ProductInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -179,7 +107,7 @@ public ProductInner withDisplayName(String displayName) {
* @return the description value.
*/
public String description() {
- return this.description;
+ return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
@@ -189,7 +117,10 @@ public String description() {
* @return the ProductInner object itself.
*/
public ProductInner withDescription(String description) {
- this.description = description;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withDescription(description);
return this;
}
@@ -199,7 +130,7 @@ public ProductInner withDescription(String description) {
* @return the publisherDisplayName value.
*/
public String publisherDisplayName() {
- return this.publisherDisplayName;
+ return this.innerProperties() == null ? null : this.innerProperties().publisherDisplayName();
}
/**
@@ -209,7 +140,10 @@ public String publisherDisplayName() {
* @return the ProductInner object itself.
*/
public ProductInner withPublisherDisplayName(String publisherDisplayName) {
- this.publisherDisplayName = publisherDisplayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withPublisherDisplayName(publisherDisplayName);
return this;
}
@@ -219,7 +153,7 @@ public ProductInner withPublisherDisplayName(String publisherDisplayName) {
* @return the publisherIdentifier value.
*/
public String publisherIdentifier() {
- return this.publisherIdentifier;
+ return this.innerProperties() == null ? null : this.innerProperties().publisherIdentifier();
}
/**
@@ -229,7 +163,10 @@ public String publisherIdentifier() {
* @return the ProductInner object itself.
*/
public ProductInner withPublisherIdentifier(String publisherIdentifier) {
- this.publisherIdentifier = publisherIdentifier;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withPublisherIdentifier(publisherIdentifier);
return this;
}
@@ -239,7 +176,7 @@ public ProductInner withPublisherIdentifier(String publisherIdentifier) {
* @return the offer value.
*/
public String offer() {
- return this.offer;
+ return this.innerProperties() == null ? null : this.innerProperties().offer();
}
/**
@@ -249,7 +186,10 @@ public String offer() {
* @return the ProductInner object itself.
*/
public ProductInner withOffer(String offer) {
- this.offer = offer;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withOffer(offer);
return this;
}
@@ -259,7 +199,7 @@ public ProductInner withOffer(String offer) {
* @return the offerVersion value.
*/
public String offerVersion() {
- return this.offerVersion;
+ return this.innerProperties() == null ? null : this.innerProperties().offerVersion();
}
/**
@@ -269,7 +209,10 @@ public String offerVersion() {
* @return the ProductInner object itself.
*/
public ProductInner withOfferVersion(String offerVersion) {
- this.offerVersion = offerVersion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withOfferVersion(offerVersion);
return this;
}
@@ -279,7 +222,7 @@ public ProductInner withOfferVersion(String offerVersion) {
* @return the sku value.
*/
public String sku() {
- return this.sku;
+ return this.innerProperties() == null ? null : this.innerProperties().sku();
}
/**
@@ -289,7 +232,10 @@ public String sku() {
* @return the ProductInner object itself.
*/
public ProductInner withSku(String sku) {
- this.sku = sku;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withSku(sku);
return this;
}
@@ -299,7 +245,7 @@ public ProductInner withSku(String sku) {
* @return the billingPartNumber value.
*/
public String billingPartNumber() {
- return this.billingPartNumber;
+ return this.innerProperties() == null ? null : this.innerProperties().billingPartNumber();
}
/**
@@ -309,7 +255,10 @@ public String billingPartNumber() {
* @return the ProductInner object itself.
*/
public ProductInner withBillingPartNumber(String billingPartNumber) {
- this.billingPartNumber = billingPartNumber;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withBillingPartNumber(billingPartNumber);
return this;
}
@@ -319,7 +268,7 @@ public ProductInner withBillingPartNumber(String billingPartNumber) {
* @return the vmExtensionType value.
*/
public String vmExtensionType() {
- return this.vmExtensionType;
+ return this.innerProperties() == null ? null : this.innerProperties().vmExtensionType();
}
/**
@@ -329,7 +278,10 @@ public String vmExtensionType() {
* @return the ProductInner object itself.
*/
public ProductInner withVmExtensionType(String vmExtensionType) {
- this.vmExtensionType = vmExtensionType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withVmExtensionType(vmExtensionType);
return this;
}
@@ -339,7 +291,7 @@ public ProductInner withVmExtensionType(String vmExtensionType) {
* @return the galleryItemIdentity value.
*/
public String galleryItemIdentity() {
- return this.galleryItemIdentity;
+ return this.innerProperties() == null ? null : this.innerProperties().galleryItemIdentity();
}
/**
@@ -349,7 +301,10 @@ public String galleryItemIdentity() {
* @return the ProductInner object itself.
*/
public ProductInner withGalleryItemIdentity(String galleryItemIdentity) {
- this.galleryItemIdentity = galleryItemIdentity;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withGalleryItemIdentity(galleryItemIdentity);
return this;
}
@@ -359,7 +314,7 @@ public ProductInner withGalleryItemIdentity(String galleryItemIdentity) {
* @return the iconUris value.
*/
public IconUris iconUris() {
- return this.iconUris;
+ return this.innerProperties() == null ? null : this.innerProperties().iconUris();
}
/**
@@ -369,7 +324,10 @@ public IconUris iconUris() {
* @return the ProductInner object itself.
*/
public ProductInner withIconUris(IconUris iconUris) {
- this.iconUris = iconUris;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withIconUris(iconUris);
return this;
}
@@ -379,7 +337,7 @@ public ProductInner withIconUris(IconUris iconUris) {
* @return the links value.
*/
public List links() {
- return this.links;
+ return this.innerProperties() == null ? null : this.innerProperties().links();
}
/**
@@ -389,7 +347,10 @@ public List links() {
* @return the ProductInner object itself.
*/
public ProductInner withLinks(List links) {
- this.links = links;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withLinks(links);
return this;
}
@@ -399,7 +360,7 @@ public ProductInner withLinks(List links) {
* @return the legalTerms value.
*/
public String legalTerms() {
- return this.legalTerms;
+ return this.innerProperties() == null ? null : this.innerProperties().legalTerms();
}
/**
@@ -409,7 +370,10 @@ public String legalTerms() {
* @return the ProductInner object itself.
*/
public ProductInner withLegalTerms(String legalTerms) {
- this.legalTerms = legalTerms;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withLegalTerms(legalTerms);
return this;
}
@@ -419,7 +383,7 @@ public ProductInner withLegalTerms(String legalTerms) {
* @return the privacyPolicy value.
*/
public String privacyPolicy() {
- return this.privacyPolicy;
+ return this.innerProperties() == null ? null : this.innerProperties().privacyPolicy();
}
/**
@@ -429,7 +393,10 @@ public String privacyPolicy() {
* @return the ProductInner object itself.
*/
public ProductInner withPrivacyPolicy(String privacyPolicy) {
- this.privacyPolicy = privacyPolicy;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withPrivacyPolicy(privacyPolicy);
return this;
}
@@ -439,7 +406,7 @@ public ProductInner withPrivacyPolicy(String privacyPolicy) {
* @return the payloadLength value.
*/
public Long payloadLength() {
- return this.payloadLength;
+ return this.innerProperties() == null ? null : this.innerProperties().payloadLength();
}
/**
@@ -449,7 +416,10 @@ public Long payloadLength() {
* @return the ProductInner object itself.
*/
public ProductInner withPayloadLength(Long payloadLength) {
- this.payloadLength = payloadLength;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withPayloadLength(payloadLength);
return this;
}
@@ -459,7 +429,7 @@ public ProductInner withPayloadLength(Long payloadLength) {
* @return the productKind value.
*/
public String productKind() {
- return this.productKind;
+ return this.innerProperties() == null ? null : this.innerProperties().productKind();
}
/**
@@ -469,7 +439,10 @@ public String productKind() {
* @return the ProductInner object itself.
*/
public ProductInner withProductKind(String productKind) {
- this.productKind = productKind;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withProductKind(productKind);
return this;
}
@@ -479,7 +452,7 @@ public ProductInner withProductKind(String productKind) {
* @return the productProperties value.
*/
public ProductProperties productProperties() {
- return this.productProperties;
+ return this.innerProperties() == null ? null : this.innerProperties().productProperties();
}
/**
@@ -489,7 +462,10 @@ public ProductProperties productProperties() {
* @return the ProductInner object itself.
*/
public ProductInner withProductProperties(ProductProperties productProperties) {
- this.productProperties = productProperties;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withProductProperties(productProperties);
return this;
}
@@ -499,7 +475,7 @@ public ProductInner withProductProperties(ProductProperties productProperties) {
* @return the compatibility value.
*/
public Compatibility compatibility() {
- return this.compatibility;
+ return this.innerProperties() == null ? null : this.innerProperties().compatibility();
}
/**
@@ -509,27 +485,10 @@ public Compatibility compatibility() {
* @return the ProductInner object itself.
*/
public ProductInner withCompatibility(Compatibility compatibility) {
- this.compatibility = compatibility;
- return this;
- }
-
- /**
- * Get the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @return the etag value.
- */
- public String etag() {
- return this.etag;
- }
-
- /**
- * Set the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @param etag the etag value to set.
- * @return the ProductInner object itself.
- */
- public ProductInner withEtag(String etag) {
- this.etag = etag;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductNestedProperties();
+ }
+ this.innerProperties().withCompatibility(compatibility);
return this;
}
@@ -539,17 +498,8 @@ public ProductInner withEtag(String etag) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (iconUris() != null) {
- iconUris().validate();
- }
- if (links() != null) {
- links().forEach(e -> e.validate());
- }
- if (productProperties() != null) {
- productProperties().validate();
- }
- if (compatibility() != null) {
- compatibility().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductNestedProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductNestedProperties.java
new file mode 100644
index 0000000000000..4ee1d6a31d6c9
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/ProductNestedProperties.java
@@ -0,0 +1,509 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.models.Compatibility;
+import com.azure.resourcemanager.azurestack.models.IconUris;
+import com.azure.resourcemanager.azurestack.models.ProductLink;
+import com.azure.resourcemanager.azurestack.models.ProductProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties portion of the product resource. */
+@Fluent
+public final class ProductNestedProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductNestedProperties.class);
+
+ /*
+ * The display name of the product.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /*
+ * The description of the product.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The user-friendly name of the product publisher.
+ */
+ @JsonProperty(value = "publisherDisplayName")
+ private String publisherDisplayName;
+
+ /*
+ * Publisher identifier.
+ */
+ @JsonProperty(value = "publisherIdentifier")
+ private String publisherIdentifier;
+
+ /*
+ * The offer representing the product.
+ */
+ @JsonProperty(value = "offer")
+ private String offer;
+
+ /*
+ * The version of the product offer.
+ */
+ @JsonProperty(value = "offerVersion")
+ private String offerVersion;
+
+ /*
+ * The product SKU.
+ */
+ @JsonProperty(value = "sku")
+ private String sku;
+
+ /*
+ * The part number used for billing purposes.
+ */
+ @JsonProperty(value = "billingPartNumber")
+ private String billingPartNumber;
+
+ /*
+ * The type of the Virtual Machine Extension.
+ */
+ @JsonProperty(value = "vmExtensionType")
+ private String vmExtensionType;
+
+ /*
+ * The identifier of the gallery item corresponding to the product.
+ */
+ @JsonProperty(value = "galleryItemIdentity")
+ private String galleryItemIdentity;
+
+ /*
+ * Additional links available for this product.
+ */
+ @JsonProperty(value = "iconUris")
+ private IconUris iconUris;
+
+ /*
+ * Additional links available for this product.
+ */
+ @JsonProperty(value = "links")
+ private List links;
+
+ /*
+ * The legal terms.
+ */
+ @JsonProperty(value = "legalTerms")
+ private String legalTerms;
+
+ /*
+ * The privacy policy.
+ */
+ @JsonProperty(value = "privacyPolicy")
+ private String privacyPolicy;
+
+ /*
+ * The length of product content.
+ */
+ @JsonProperty(value = "payloadLength")
+ private Long payloadLength;
+
+ /*
+ * The kind of the product (virtualMachine or virtualMachineExtension)
+ */
+ @JsonProperty(value = "productKind")
+ private String productKind;
+
+ /*
+ * Additional properties for the product.
+ */
+ @JsonProperty(value = "productProperties")
+ private ProductProperties productProperties;
+
+ /*
+ * Product compatibility with current device.
+ */
+ @JsonProperty(value = "compatibility")
+ private Compatibility compatibility;
+
+ /**
+ * Get the displayName property: The display name of the product.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the product.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the product.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the product.
+ *
+ * @param description the description value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the publisherDisplayName property: The user-friendly name of the product publisher.
+ *
+ * @return the publisherDisplayName value.
+ */
+ public String publisherDisplayName() {
+ return this.publisherDisplayName;
+ }
+
+ /**
+ * Set the publisherDisplayName property: The user-friendly name of the product publisher.
+ *
+ * @param publisherDisplayName the publisherDisplayName value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withPublisherDisplayName(String publisherDisplayName) {
+ this.publisherDisplayName = publisherDisplayName;
+ return this;
+ }
+
+ /**
+ * Get the publisherIdentifier property: Publisher identifier.
+ *
+ * @return the publisherIdentifier value.
+ */
+ public String publisherIdentifier() {
+ return this.publisherIdentifier;
+ }
+
+ /**
+ * Set the publisherIdentifier property: Publisher identifier.
+ *
+ * @param publisherIdentifier the publisherIdentifier value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withPublisherIdentifier(String publisherIdentifier) {
+ this.publisherIdentifier = publisherIdentifier;
+ return this;
+ }
+
+ /**
+ * Get the offer property: The offer representing the product.
+ *
+ * @return the offer value.
+ */
+ public String offer() {
+ return this.offer;
+ }
+
+ /**
+ * Set the offer property: The offer representing the product.
+ *
+ * @param offer the offer value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withOffer(String offer) {
+ this.offer = offer;
+ return this;
+ }
+
+ /**
+ * Get the offerVersion property: The version of the product offer.
+ *
+ * @return the offerVersion value.
+ */
+ public String offerVersion() {
+ return this.offerVersion;
+ }
+
+ /**
+ * Set the offerVersion property: The version of the product offer.
+ *
+ * @param offerVersion the offerVersion value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withOfferVersion(String offerVersion) {
+ this.offerVersion = offerVersion;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The product SKU.
+ *
+ * @return the sku value.
+ */
+ public String sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The product SKU.
+ *
+ * @param sku the sku value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withSku(String sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the billingPartNumber property: The part number used for billing purposes.
+ *
+ * @return the billingPartNumber value.
+ */
+ public String billingPartNumber() {
+ return this.billingPartNumber;
+ }
+
+ /**
+ * Set the billingPartNumber property: The part number used for billing purposes.
+ *
+ * @param billingPartNumber the billingPartNumber value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withBillingPartNumber(String billingPartNumber) {
+ this.billingPartNumber = billingPartNumber;
+ return this;
+ }
+
+ /**
+ * Get the vmExtensionType property: The type of the Virtual Machine Extension.
+ *
+ * @return the vmExtensionType value.
+ */
+ public String vmExtensionType() {
+ return this.vmExtensionType;
+ }
+
+ /**
+ * Set the vmExtensionType property: The type of the Virtual Machine Extension.
+ *
+ * @param vmExtensionType the vmExtensionType value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withVmExtensionType(String vmExtensionType) {
+ this.vmExtensionType = vmExtensionType;
+ return this;
+ }
+
+ /**
+ * Get the galleryItemIdentity property: The identifier of the gallery item corresponding to the product.
+ *
+ * @return the galleryItemIdentity value.
+ */
+ public String galleryItemIdentity() {
+ return this.galleryItemIdentity;
+ }
+
+ /**
+ * Set the galleryItemIdentity property: The identifier of the gallery item corresponding to the product.
+ *
+ * @param galleryItemIdentity the galleryItemIdentity value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withGalleryItemIdentity(String galleryItemIdentity) {
+ this.galleryItemIdentity = galleryItemIdentity;
+ return this;
+ }
+
+ /**
+ * Get the iconUris property: Additional links available for this product.
+ *
+ * @return the iconUris value.
+ */
+ public IconUris iconUris() {
+ return this.iconUris;
+ }
+
+ /**
+ * Set the iconUris property: Additional links available for this product.
+ *
+ * @param iconUris the iconUris value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withIconUris(IconUris iconUris) {
+ this.iconUris = iconUris;
+ return this;
+ }
+
+ /**
+ * Get the links property: Additional links available for this product.
+ *
+ * @return the links value.
+ */
+ public List links() {
+ return this.links;
+ }
+
+ /**
+ * Set the links property: Additional links available for this product.
+ *
+ * @param links the links value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withLinks(List links) {
+ this.links = links;
+ return this;
+ }
+
+ /**
+ * Get the legalTerms property: The legal terms.
+ *
+ * @return the legalTerms value.
+ */
+ public String legalTerms() {
+ return this.legalTerms;
+ }
+
+ /**
+ * Set the legalTerms property: The legal terms.
+ *
+ * @param legalTerms the legalTerms value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withLegalTerms(String legalTerms) {
+ this.legalTerms = legalTerms;
+ return this;
+ }
+
+ /**
+ * Get the privacyPolicy property: The privacy policy.
+ *
+ * @return the privacyPolicy value.
+ */
+ public String privacyPolicy() {
+ return this.privacyPolicy;
+ }
+
+ /**
+ * Set the privacyPolicy property: The privacy policy.
+ *
+ * @param privacyPolicy the privacyPolicy value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withPrivacyPolicy(String privacyPolicy) {
+ this.privacyPolicy = privacyPolicy;
+ return this;
+ }
+
+ /**
+ * Get the payloadLength property: The length of product content.
+ *
+ * @return the payloadLength value.
+ */
+ public Long payloadLength() {
+ return this.payloadLength;
+ }
+
+ /**
+ * Set the payloadLength property: The length of product content.
+ *
+ * @param payloadLength the payloadLength value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withPayloadLength(Long payloadLength) {
+ this.payloadLength = payloadLength;
+ return this;
+ }
+
+ /**
+ * Get the productKind property: The kind of the product (virtualMachine or virtualMachineExtension).
+ *
+ * @return the productKind value.
+ */
+ public String productKind() {
+ return this.productKind;
+ }
+
+ /**
+ * Set the productKind property: The kind of the product (virtualMachine or virtualMachineExtension).
+ *
+ * @param productKind the productKind value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withProductKind(String productKind) {
+ this.productKind = productKind;
+ return this;
+ }
+
+ /**
+ * Get the productProperties property: Additional properties for the product.
+ *
+ * @return the productProperties value.
+ */
+ public ProductProperties productProperties() {
+ return this.productProperties;
+ }
+
+ /**
+ * Set the productProperties property: Additional properties for the product.
+ *
+ * @param productProperties the productProperties value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withProductProperties(ProductProperties productProperties) {
+ this.productProperties = productProperties;
+ return this;
+ }
+
+ /**
+ * Get the compatibility property: Product compatibility with current device.
+ *
+ * @return the compatibility value.
+ */
+ public Compatibility compatibility() {
+ return this.compatibility;
+ }
+
+ /**
+ * Set the compatibility property: Product compatibility with current device.
+ *
+ * @param compatibility the compatibility value to set.
+ * @return the ProductNestedProperties object itself.
+ */
+ public ProductNestedProperties withCompatibility(Compatibility compatibility) {
+ this.compatibility = compatibility;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (iconUris() != null) {
+ iconUris().validate();
+ }
+ if (links() != null) {
+ links().forEach(e -> e.validate());
+ }
+ if (productProperties() != null) {
+ productProperties().validate();
+ }
+ if (compatibility() != null) {
+ compatibility().validate();
+ }
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationInner.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationInner.java
index 6de84a740ca83..d7595b80088af 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationInner.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.azurestack.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -14,29 +13,15 @@
import java.util.Map;
/** Registration information. */
-@JsonFlatten
@Fluent
-public class RegistrationInner extends Resource {
+public final class RegistrationInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RegistrationInner.class);
/*
- * The object identifier associated with the Azure Stack connecting to
- * Azure.
+ * Registration resource.
*/
- @JsonProperty(value = "properties.objectId")
- private String objectId;
-
- /*
- * The identifier of the registered Azure Stack.
- */
- @JsonProperty(value = "properties.cloudId")
- private String cloudId;
-
- /*
- * Specifies the billing mode for the Azure Stack registration.
- */
- @JsonProperty(value = "properties.billingModel")
- private String billingModel;
+ @JsonProperty(value = "properties")
+ private RegistrationProperties innerProperties;
/*
* The kind of the resource.
@@ -58,63 +43,12 @@ public class RegistrationInner extends Resource {
private String etag;
/**
- * Get the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
- *
- * @return the objectId value.
- */
- public String objectId() {
- return this.objectId;
- }
-
- /**
- * Set the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
- *
- * @param objectId the objectId value to set.
- * @return the RegistrationInner object itself.
- */
- public RegistrationInner withObjectId(String objectId) {
- this.objectId = objectId;
- return this;
- }
-
- /**
- * Get the cloudId property: The identifier of the registered Azure Stack.
+ * Get the innerProperties property: Registration resource.
*
- * @return the cloudId value.
+ * @return the innerProperties value.
*/
- public String cloudId() {
- return this.cloudId;
- }
-
- /**
- * Set the cloudId property: The identifier of the registered Azure Stack.
- *
- * @param cloudId the cloudId value to set.
- * @return the RegistrationInner object itself.
- */
- public RegistrationInner withCloudId(String cloudId) {
- this.cloudId = cloudId;
- return this;
- }
-
- /**
- * Get the billingModel property: Specifies the billing mode for the Azure Stack registration.
- *
- * @return the billingModel value.
- */
- public String billingModel() {
- return this.billingModel;
- }
-
- /**
- * Set the billingModel property: Specifies the billing mode for the Azure Stack registration.
- *
- * @param billingModel the billingModel value to set.
- * @return the RegistrationInner object itself.
- */
- public RegistrationInner withBillingModel(String billingModel) {
- this.billingModel = billingModel;
- return this;
+ private RegistrationProperties innerProperties() {
+ return this.innerProperties;
}
/**
@@ -169,11 +103,83 @@ public RegistrationInner withTags(Map tags) {
return this;
}
+ /**
+ * Get the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
+ *
+ * @return the objectId value.
+ */
+ public String objectId() {
+ return this.innerProperties() == null ? null : this.innerProperties().objectId();
+ }
+
+ /**
+ * Set the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
+ *
+ * @param objectId the objectId value to set.
+ * @return the RegistrationInner object itself.
+ */
+ public RegistrationInner withObjectId(String objectId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RegistrationProperties();
+ }
+ this.innerProperties().withObjectId(objectId);
+ return this;
+ }
+
+ /**
+ * Get the cloudId property: The identifier of the registered Azure Stack.
+ *
+ * @return the cloudId value.
+ */
+ public String cloudId() {
+ return this.innerProperties() == null ? null : this.innerProperties().cloudId();
+ }
+
+ /**
+ * Set the cloudId property: The identifier of the registered Azure Stack.
+ *
+ * @param cloudId the cloudId value to set.
+ * @return the RegistrationInner object itself.
+ */
+ public RegistrationInner withCloudId(String cloudId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RegistrationProperties();
+ }
+ this.innerProperties().withCloudId(cloudId);
+ return this;
+ }
+
+ /**
+ * Get the billingModel property: Specifies the billing mode for the Azure Stack registration.
+ *
+ * @return the billingModel value.
+ */
+ public String billingModel() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingModel();
+ }
+
+ /**
+ * Set the billingModel property: Specifies the billing mode for the Azure Stack registration.
+ *
+ * @param billingModel the billingModel value to set.
+ * @return the RegistrationInner object itself.
+ */
+ public RegistrationInner withBillingModel(String billingModel) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RegistrationProperties();
+ }
+ this.innerProperties().withBillingModel(billingModel);
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationParameterProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationParameterProperties.java
new file mode 100644
index 0000000000000..52da9956be0ac
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationParameterProperties.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the Azure Stack registration resource. */
+@Fluent
+public final class RegistrationParameterProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistrationParameterProperties.class);
+
+ /*
+ * The token identifying registered Azure Stack
+ */
+ @JsonProperty(value = "registrationToken", required = true)
+ private String registrationToken;
+
+ /**
+ * Get the registrationToken property: The token identifying registered Azure Stack.
+ *
+ * @return the registrationToken value.
+ */
+ public String registrationToken() {
+ return this.registrationToken;
+ }
+
+ /**
+ * Set the registrationToken property: The token identifying registered Azure Stack.
+ *
+ * @param registrationToken the registrationToken value to set.
+ * @return the RegistrationParameterProperties object itself.
+ */
+ public RegistrationParameterProperties withRegistrationToken(String registrationToken) {
+ this.registrationToken = registrationToken;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (registrationToken() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property registrationToken in model RegistrationParameterProperties"));
+ }
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationProperties.java
new file mode 100644
index 0000000000000..cc9edfa7f0f83
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/RegistrationProperties.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties portion of the registration resource. */
+@Fluent
+public final class RegistrationProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistrationProperties.class);
+
+ /*
+ * The object identifier associated with the Azure Stack connecting to
+ * Azure.
+ */
+ @JsonProperty(value = "objectId")
+ private String objectId;
+
+ /*
+ * The identifier of the registered Azure Stack.
+ */
+ @JsonProperty(value = "cloudId")
+ private String cloudId;
+
+ /*
+ * Specifies the billing mode for the Azure Stack registration.
+ */
+ @JsonProperty(value = "billingModel")
+ private String billingModel;
+
+ /**
+ * Get the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
+ *
+ * @return the objectId value.
+ */
+ public String objectId() {
+ return this.objectId;
+ }
+
+ /**
+ * Set the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
+ *
+ * @param objectId the objectId value to set.
+ * @return the RegistrationProperties object itself.
+ */
+ public RegistrationProperties withObjectId(String objectId) {
+ this.objectId = objectId;
+ return this;
+ }
+
+ /**
+ * Get the cloudId property: The identifier of the registered Azure Stack.
+ *
+ * @return the cloudId value.
+ */
+ public String cloudId() {
+ return this.cloudId;
+ }
+
+ /**
+ * Set the cloudId property: The identifier of the registered Azure Stack.
+ *
+ * @param cloudId the cloudId value to set.
+ * @return the RegistrationProperties object itself.
+ */
+ public RegistrationProperties withCloudId(String cloudId) {
+ this.cloudId = cloudId;
+ return this;
+ }
+
+ /**
+ * Get the billingModel property: Specifies the billing mode for the Azure Stack registration.
+ *
+ * @return the billingModel value.
+ */
+ public String billingModel() {
+ return this.billingModel;
+ }
+
+ /**
+ * Set the billingModel property: Specifies the billing mode for the Azure Stack registration.
+ *
+ * @param billingModel the billingModel value to set.
+ * @return the RegistrationProperties object itself.
+ */
+ public RegistrationProperties withBillingModel(String billingModel) {
+ this.billingModel = billingModel;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/Uri.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/Uri.java
new file mode 100644
index 0000000000000..cd605c6a7fe46
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/models/Uri.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The URI. */
+@Immutable
+public final class Uri {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(Uri.class);
+
+ /*
+ * The URI.
+ */
+ @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY)
+ private String uri;
+
+ /**
+ * Get the uri property: The URI.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionImpl.java
index 825cd7cd7b98e..aaaa27b92af98 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionImpl.java
@@ -36,14 +36,14 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
- public String tenantId() {
- return this.innerModel().tenantId();
- }
-
public String etag() {
return this.innerModel().etag();
}
+ public String tenantId() {
+ return this.innerModel().tenantId();
+ }
+
public CustomerSubscriptionInner innerModel() {
return this.innerObject;
}
@@ -112,13 +112,13 @@ public CustomerSubscription refresh(Context context) {
return this;
}
- public CustomerSubscriptionImpl withTenantId(String tenantId) {
- this.innerModel().withTenantId(tenantId);
+ public CustomerSubscriptionImpl withEtag(String etag) {
+ this.innerModel().withEtag(etag);
return this;
}
- public CustomerSubscriptionImpl withEtag(String etag) {
- this.innerModel().withEtag(etag);
+ public CustomerSubscriptionImpl withTenantId(String tenantId) {
+ this.innerModel().withTenantId(tenantId);
return this;
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionsImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionsImpl.java
index 5aedb87647601..ebc29f163f4f5 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionsImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/CustomerSubscriptionsImpl.java
@@ -160,7 +160,7 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'customerSubscriptions'.",
id)));
}
- this.deleteWithResponse(resourceGroup, registrationName, customerSubscriptionName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroup, registrationName, customerSubscriptionName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ExtendedProductImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ExtendedProductImpl.java
index 0074c24c6c61b..a23ab906ff1e7 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ExtendedProductImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ExtendedProductImpl.java
@@ -32,49 +32,45 @@ public String productKind() {
return this.innerModel().productKind();
}
- public ComputeRole computeRole() {
- return this.innerModel().computeRole();
- }
-
- public Boolean isSystemExtension() {
- return this.innerModel().isSystemExtension();
+ public String version() {
+ return this.innerModel().version();
}
- public Boolean supportMultipleExtensions() {
- return this.innerModel().supportMultipleExtensions();
+ public OsDiskImage osDiskImage() {
+ return this.innerModel().osDiskImage();
}
- public String versionPropertiesVersion() {
- return this.innerModel().versionPropertiesVersion();
+ public List dataDiskImages() {
+ List inner = this.innerModel().dataDiskImages();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
}
- public OperatingSystem vmOsType() {
- return this.innerModel().vmOsType();
+ public ComputeRole computeRole() {
+ return this.innerModel().computeRole();
}
- public Boolean vmScaleSetEnabled() {
- return this.innerModel().vmScaleSetEnabled();
+ public Boolean isSystemExtension() {
+ return this.innerModel().isSystemExtension();
}
public String uri() {
return this.innerModel().uri();
}
- public String version() {
- return this.innerModel().version();
+ public Boolean supportMultipleExtensions() {
+ return this.innerModel().supportMultipleExtensions();
}
- public OsDiskImage osDiskImage() {
- return this.innerModel().osDiskImage();
+ public OperatingSystem vmOsType() {
+ return this.innerModel().vmOsType();
}
- public List dataDiskImages() {
- List inner = this.innerModel().dataDiskImages();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
+ public Boolean vmScaleSetEnabled() {
+ return this.innerModel().vmScaleSetEnabled();
}
public ExtendedProductInner innerModel() {
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionImpl.java
index fa447abcc9520..dcd25b8208d65 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionImpl.java
@@ -45,6 +45,18 @@ public Map tags() {
}
}
+ public String kind() {
+ return this.innerModel().kind();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
public String linkedSubscriptionId() {
return this.innerModel().linkedSubscriptionId();
}
@@ -73,18 +85,6 @@ public String deviceConnectionStatus() {
return this.innerModel().deviceConnectionStatus();
}
- public String kind() {
- return this.innerModel().kind();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String etag() {
- return this.innerModel().etag();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionsImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionsImpl.java
index 3ac3cd0bbeae6..e1b3d420f18d8 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionsImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/LinkedSubscriptionsImpl.java
@@ -140,7 +140,7 @@ public void deleteById(String id) {
.format(
"The resource ID '%s' is not valid. Missing path segment 'linkedSubscriptions'.", id)));
}
- this.deleteWithResponse(resourceGroup, linkedSubscriptionName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroup, linkedSubscriptionName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ProductImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ProductImpl.java
index fc117af7a79b7..1db11c7180b94 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ProductImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/ProductImpl.java
@@ -40,6 +40,10 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
public String displayName() {
return this.innerModel().displayName();
}
@@ -117,10 +121,6 @@ public Compatibility compatibility() {
return this.innerModel().compatibility();
}
- public String etag() {
- return this.innerModel().etag();
- }
-
public ProductInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationImpl.java
index 7a1c7ecf47447..f9b82fcf5f1ca 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationImpl.java
@@ -46,18 +46,6 @@ public Map tags() {
}
}
- public String objectId() {
- return this.innerModel().objectId();
- }
-
- public String cloudId() {
- return this.innerModel().cloudId();
- }
-
- public String billingModel() {
- return this.innerModel().billingModel();
- }
-
public String kind() {
return this.innerModel().kind();
}
@@ -70,6 +58,18 @@ public String etag() {
return this.innerModel().etag();
}
+ public String objectId() {
+ return this.innerModel().objectId();
+ }
+
+ public String cloudId() {
+ return this.innerModel().cloudId();
+ }
+
+ public String billingModel() {
+ return this.innerModel().billingModel();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsClientImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsClientImpl.java
index e73366114a722..14ead4f666193 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsClientImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsClientImpl.java
@@ -80,6 +80,17 @@ Mono> listByResourceGroup(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStack/registrations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack"
@@ -180,6 +191,16 @@ Mono> listNext(
@HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -342,6 +363,147 @@ public PagedIterable listByResourceGroup(String resourceGroup
return new PagedIterable<>(listByResourceGroupAsync(resourceGroup, context));
}
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
/**
* Returns the properties of an Azure Stack registration.
*
@@ -1322,4 +1484,77 @@ private Mono> listNextSinglePageAsync(String ne
res.getValue().nextLink(),
null));
}
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsImpl.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsImpl.java
index 8876a6eea40f5..b8f694daba31d 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsImpl.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/implementation/RegistrationsImpl.java
@@ -40,6 +40,16 @@ public PagedIterable listByResourceGroup(String resourceGroup, Con
return Utils.mapPage(inner, inner1 -> new RegistrationImpl(inner1, this.manager()));
}
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new RegistrationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new RegistrationImpl(inner1, this.manager()));
+ }
+
public Registration getByResourceGroup(String resourceGroup, String registrationName) {
RegistrationInner inner = this.serviceClient().getByResourceGroup(resourceGroup, registrationName);
if (inner != null) {
@@ -159,7 +169,7 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'registrations'.", id)));
}
- this.deleteWithResponse(resourceGroup, registrationName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroup, registrationName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CloudManifestFileDeploymentData.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CloudManifestFileDeploymentData.java
index 7a384ffc37be8..b8b62f8ae8692 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CloudManifestFileDeploymentData.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CloudManifestFileDeploymentData.java
@@ -5,15 +5,14 @@
package com.azure.resourcemanager.azurestack.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.fluent.models.CloudManifestFileEnvironmentEndpoints;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Cloud specific manifest data for AzureStack deployment. */
-@JsonFlatten
@Fluent
-public class CloudManifestFileDeploymentData {
+public final class CloudManifestFileDeploymentData {
@JsonIgnore private final ClientLogger logger = new ClientLogger(CloudManifestFileDeploymentData.class);
/*
@@ -29,16 +28,10 @@ public class CloudManifestFileDeploymentData {
private String customCloudVerificationKey;
/*
- * ARM endpoint.
+ * Environment endpoints.
*/
- @JsonProperty(value = "customEnvironmentEndpoints.customCloudArmEndpoint")
- private String customCloudArmEndpoint;
-
- /*
- * Dsms endpoint.
- */
- @JsonProperty(value = "customEnvironmentEndpoints.externalDsmsEndpoint")
- private String externalDsmsEndpoint;
+ @JsonProperty(value = "customEnvironmentEndpoints")
+ private CloudManifestFileEnvironmentEndpoints innerCustomEnvironmentEndpoints;
/**
* Get the externalDsmsCertificates property: Dsms external certificates.
@@ -80,13 +73,24 @@ public CloudManifestFileDeploymentData withCustomCloudVerificationKey(String cus
return this;
}
+ /**
+ * Get the innerCustomEnvironmentEndpoints property: Environment endpoints.
+ *
+ * @return the innerCustomEnvironmentEndpoints value.
+ */
+ private CloudManifestFileEnvironmentEndpoints innerCustomEnvironmentEndpoints() {
+ return this.innerCustomEnvironmentEndpoints;
+ }
+
/**
* Get the customCloudArmEndpoint property: ARM endpoint.
*
* @return the customCloudArmEndpoint value.
*/
public String customCloudArmEndpoint() {
- return this.customCloudArmEndpoint;
+ return this.innerCustomEnvironmentEndpoints() == null
+ ? null
+ : this.innerCustomEnvironmentEndpoints().customCloudArmEndpoint();
}
/**
@@ -96,7 +100,10 @@ public String customCloudArmEndpoint() {
* @return the CloudManifestFileDeploymentData object itself.
*/
public CloudManifestFileDeploymentData withCustomCloudArmEndpoint(String customCloudArmEndpoint) {
- this.customCloudArmEndpoint = customCloudArmEndpoint;
+ if (this.innerCustomEnvironmentEndpoints() == null) {
+ this.innerCustomEnvironmentEndpoints = new CloudManifestFileEnvironmentEndpoints();
+ }
+ this.innerCustomEnvironmentEndpoints().withCustomCloudArmEndpoint(customCloudArmEndpoint);
return this;
}
@@ -106,7 +113,9 @@ public CloudManifestFileDeploymentData withCustomCloudArmEndpoint(String customC
* @return the externalDsmsEndpoint value.
*/
public String externalDsmsEndpoint() {
- return this.externalDsmsEndpoint;
+ return this.innerCustomEnvironmentEndpoints() == null
+ ? null
+ : this.innerCustomEnvironmentEndpoints().externalDsmsEndpoint();
}
/**
@@ -116,7 +125,10 @@ public String externalDsmsEndpoint() {
* @return the CloudManifestFileDeploymentData object itself.
*/
public CloudManifestFileDeploymentData withExternalDsmsEndpoint(String externalDsmsEndpoint) {
- this.externalDsmsEndpoint = externalDsmsEndpoint;
+ if (this.innerCustomEnvironmentEndpoints() == null) {
+ this.innerCustomEnvironmentEndpoints = new CloudManifestFileEnvironmentEndpoints();
+ }
+ this.innerCustomEnvironmentEndpoints().withExternalDsmsEndpoint(externalDsmsEndpoint);
return this;
}
@@ -126,5 +138,8 @@ public CloudManifestFileDeploymentData withExternalDsmsEndpoint(String externalD
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerCustomEnvironmentEndpoints() != null) {
+ innerCustomEnvironmentEndpoints().validate();
+ }
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CustomerSubscription.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CustomerSubscription.java
index 6076c8b60883c..3fb250b29a7f4 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CustomerSubscription.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/CustomerSubscription.java
@@ -39,18 +39,18 @@ public interface CustomerSubscription {
SystemData systemData();
/**
- * Gets the tenantId property: Tenant Id.
+ * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
*
- * @return the tenantId value.
+ * @return the etag value.
*/
- String tenantId();
+ String etag();
/**
- * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ * Gets the tenantId property: Tenant Id.
*
- * @return the etag value.
+ * @return the tenantId value.
*/
- String etag();
+ String tenantId();
/**
* Gets the inner com.azure.resourcemanager.azurestack.fluent.models.CustomerSubscriptionInner object.
@@ -83,7 +83,7 @@ interface WithParentResource {
* The stage of the CustomerSubscription definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
*/
- interface WithCreate extends DefinitionStages.WithTenantId, DefinitionStages.WithEtag {
+ interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithTenantId {
/**
* Executes the create request.
*
@@ -99,16 +99,6 @@ interface WithCreate extends DefinitionStages.WithTenantId, DefinitionStages.Wit
*/
CustomerSubscription create(Context context);
}
- /** The stage of the CustomerSubscription definition allowing to specify tenantId. */
- interface WithTenantId {
- /**
- * Specifies the tenantId property: Tenant Id..
- *
- * @param tenantId Tenant Id.
- * @return the next definition stage.
- */
- WithCreate withTenantId(String tenantId);
- }
/** The stage of the CustomerSubscription definition allowing to specify etag. */
interface WithEtag {
/**
@@ -119,6 +109,16 @@ interface WithEtag {
*/
WithCreate withEtag(String etag);
}
+ /** The stage of the CustomerSubscription definition allowing to specify tenantId. */
+ interface WithTenantId {
+ /**
+ * Specifies the tenantId property: Tenant Id..
+ *
+ * @param tenantId Tenant Id.
+ * @return the next definition stage.
+ */
+ WithCreate withTenantId(String tenantId);
+ }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProduct.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProduct.java
index bf07e51282f96..f43e1c038ce80 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProduct.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/ExtendedProduct.java
@@ -25,46 +25,39 @@ public interface ExtendedProduct {
String productKind();
/**
- * Gets the computeRole property: Specifies kind of compute role included in the package.
- *
- * @return the computeRole value.
- */
- ComputeRole computeRole();
-
- /**
- * Gets the isSystemExtension property: Specifies if product is a Virtual Machine Extension.
+ * Gets the version property: Specifies product version.
*
- * @return the isSystemExtension value.
+ * @return the version value.
*/
- Boolean isSystemExtension();
+ String version();
/**
- * Gets the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
+ * Gets the osDiskImage property: OS disk image used by product.
*
- * @return the supportMultipleExtensions value.
+ * @return the osDiskImage value.
*/
- Boolean supportMultipleExtensions();
+ OsDiskImage osDiskImage();
/**
- * Gets the versionPropertiesVersion property: Specifies product version.
+ * Gets the dataDiskImages property: List of attached data disks.
*
- * @return the versionPropertiesVersion value.
+ * @return the dataDiskImages value.
*/
- String versionPropertiesVersion();
+ List dataDiskImages();
/**
- * Gets the vmOsType property: Specifies operating system used by the product.
+ * Gets the computeRole property: Specifies kind of compute role included in the package.
*
- * @return the vmOsType value.
+ * @return the computeRole value.
*/
- OperatingSystem vmOsType();
+ ComputeRole computeRole();
/**
- * Gets the vmScaleSetEnabled property: Indicates if virtual machine Scale Set is enabled in the specified product.
+ * Gets the isSystemExtension property: Specifies if product is a Virtual Machine Extension.
*
- * @return the vmScaleSetEnabled value.
+ * @return the isSystemExtension value.
*/
- Boolean vmScaleSetEnabled();
+ Boolean isSystemExtension();
/**
* Gets the uri property: The URI.
@@ -74,25 +67,25 @@ public interface ExtendedProduct {
String uri();
/**
- * Gets the version property: Specifies product version.
+ * Gets the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
*
- * @return the version value.
+ * @return the supportMultipleExtensions value.
*/
- String version();
+ Boolean supportMultipleExtensions();
/**
- * Gets the osDiskImage property: OS disk image used by product.
+ * Gets the vmOsType property: Specifies operating system used by the product.
*
- * @return the osDiskImage value.
+ * @return the vmOsType value.
*/
- OsDiskImage osDiskImage();
+ OperatingSystem vmOsType();
/**
- * Gets the dataDiskImages property: List of attached data disks.
+ * Gets the vmScaleSetEnabled property: Indicates if virtual machine Scale Set is enabled in the specified product.
*
- * @return the dataDiskImages value.
+ * @return the vmScaleSetEnabled value.
*/
- List dataDiskImages();
+ Boolean vmScaleSetEnabled();
/**
* Gets the inner com.azure.resourcemanager.azurestack.fluent.models.ExtendedProductInner object.
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscription.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscription.java
index a5c9af45d705f..3a4a0ab9be69e 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscription.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscription.java
@@ -47,6 +47,27 @@ public interface LinkedSubscription {
*/
Map tags();
+ /**
+ * Gets the kind property: The kind of the resource.
+ *
+ * @return the kind value.
+ */
+ String kind();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @return the etag value.
+ */
+ String etag();
+
/**
* Gets the linkedSubscriptionId property: The identifier associated with the device subscription.
*
@@ -99,27 +120,6 @@ public interface LinkedSubscription {
*/
String deviceConnectionStatus();
- /**
- * Gets the kind property: The kind of the resource.
- *
- * @return the kind value.
- */
- String kind();
-
- /**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
- /**
- * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @return the etag value.
- */
- String etag();
-
/**
* Gets the region of the resource.
*
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscriptionParameter.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscriptionParameter.java
index cc85602cd0d76..f630c1d9b09ae 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscriptionParameter.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/LinkedSubscriptionParameter.java
@@ -5,34 +5,36 @@
package com.azure.resourcemanager.azurestack.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.fluent.models.LinkedSubscriptionParameterProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Linked Subscription resource. */
-@JsonFlatten
@Fluent
-public class LinkedSubscriptionParameter {
+public final class LinkedSubscriptionParameter {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedSubscriptionParameter.class);
/*
- * Location of the resource.
+ * Properties of the Linked Subscription resource
*/
- @JsonProperty(value = "location", required = true)
- private Location location;
+ @JsonProperty(value = "properties", required = true)
+ private LinkedSubscriptionParameterProperties innerProperties = new LinkedSubscriptionParameterProperties();
/*
- * The identifier associated with the device subscription.
+ * Location of the resource.
*/
- @JsonProperty(value = "properties.linkedSubscriptionId", required = true)
- private String linkedSubscriptionId;
+ @JsonProperty(value = "location", required = true)
+ private Location location;
- /*
- * The identifier associated with the device registration.
+ /**
+ * Get the innerProperties property: Properties of the Linked Subscription resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.registrationResourceId", required = true)
- private String registrationResourceId;
+ private LinkedSubscriptionParameterProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the location property: Location of the resource.
@@ -60,7 +62,7 @@ public LinkedSubscriptionParameter withLocation(Location location) {
* @return the linkedSubscriptionId value.
*/
public String linkedSubscriptionId() {
- return this.linkedSubscriptionId;
+ return this.innerProperties() == null ? null : this.innerProperties().linkedSubscriptionId();
}
/**
@@ -70,7 +72,10 @@ public String linkedSubscriptionId() {
* @return the LinkedSubscriptionParameter object itself.
*/
public LinkedSubscriptionParameter withLinkedSubscriptionId(String linkedSubscriptionId) {
- this.linkedSubscriptionId = linkedSubscriptionId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedSubscriptionParameterProperties();
+ }
+ this.innerProperties().withLinkedSubscriptionId(linkedSubscriptionId);
return this;
}
@@ -80,7 +85,7 @@ public LinkedSubscriptionParameter withLinkedSubscriptionId(String linkedSubscri
* @return the registrationResourceId value.
*/
public String registrationResourceId() {
- return this.registrationResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().registrationResourceId();
}
/**
@@ -90,7 +95,10 @@ public String registrationResourceId() {
* @return the LinkedSubscriptionParameter object itself.
*/
public LinkedSubscriptionParameter withRegistrationResourceId(String registrationResourceId) {
- this.registrationResourceId = registrationResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedSubscriptionParameterProperties();
+ }
+ this.innerProperties().withRegistrationResourceId(registrationResourceId);
return this;
}
@@ -100,23 +108,19 @@ public LinkedSubscriptionParameter withRegistrationResourceId(String registratio
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (location() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property location in model LinkedSubscriptionParameter"));
- }
- if (linkedSubscriptionId() == null) {
+ if (innerProperties() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property linkedSubscriptionId in model LinkedSubscriptionParameter"));
+ "Missing required property innerProperties in model LinkedSubscriptionParameter"));
+ } else {
+ innerProperties().validate();
}
- if (registrationResourceId() == null) {
+ if (location() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property registrationResourceId in model LinkedSubscriptionParameter"));
+ "Missing required property location in model LinkedSubscriptionParameter"));
}
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Product.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Product.java
index fb95c4172b3e9..ddc2806d782db 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Product.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Product.java
@@ -38,6 +38,13 @@ public interface Product {
*/
SystemData systemData();
+ /**
+ * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ *
+ * @return the etag value.
+ */
+ String etag();
+
/**
* Gets the displayName property: The display name of the product.
*
@@ -164,13 +171,6 @@ public interface Product {
*/
Compatibility compatibility();
- /**
- * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
- *
- * @return the etag value.
- */
- String etag();
-
/**
* Gets the inner com.azure.resourcemanager.azurestack.fluent.models.ProductInner object.
*
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registration.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registration.java
index 23210d4b906c8..32f01b6849fe0 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registration.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registration.java
@@ -49,46 +49,46 @@ public interface Registration {
Map tags();
/**
- * Gets the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
+ * Gets the kind property: The kind of the resource.
*
- * @return the objectId value.
+ * @return the kind value.
*/
- String objectId();
+ String kind();
/**
- * Gets the cloudId property: The identifier of the registered Azure Stack.
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @return the cloudId value.
+ * @return the systemData value.
*/
- String cloudId();
+ SystemData systemData();
/**
- * Gets the billingModel property: Specifies the billing mode for the Azure Stack registration.
+ * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
*
- * @return the billingModel value.
+ * @return the etag value.
*/
- String billingModel();
+ String etag();
/**
- * Gets the kind property: The kind of the resource.
+ * Gets the objectId property: The object identifier associated with the Azure Stack connecting to Azure.
*
- * @return the kind value.
+ * @return the objectId value.
*/
- String kind();
+ String objectId();
/**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Gets the cloudId property: The identifier of the registered Azure Stack.
*
- * @return the systemData value.
+ * @return the cloudId value.
*/
- SystemData systemData();
+ String cloudId();
/**
- * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.
+ * Gets the billingModel property: Specifies the billing mode for the Azure Stack registration.
*
- * @return the etag value.
+ * @return the billingModel value.
*/
- String etag();
+ String billingModel();
/**
* Gets the region of the resource.
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/RegistrationParameter.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/RegistrationParameter.java
index 1b5a91f04e1ab..9ee58d2d8d069 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/RegistrationParameter.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/RegistrationParameter.java
@@ -5,28 +5,36 @@
package com.azure.resourcemanager.azurestack.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.fluent.models.RegistrationParameterProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Registration resource. */
-@JsonFlatten
@Fluent
-public class RegistrationParameter {
+public final class RegistrationParameter {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RegistrationParameter.class);
+ /*
+ * Properties of the Azure Stack registration resource
+ */
+ @JsonProperty(value = "properties", required = true)
+ private RegistrationParameterProperties innerProperties = new RegistrationParameterProperties();
+
/*
* Location of the resource.
*/
@JsonProperty(value = "location", required = true)
private Location location;
- /*
- * The token identifying registered Azure Stack
+ /**
+ * Get the innerProperties property: Properties of the Azure Stack registration resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.registrationToken", required = true)
- private String registrationToken;
+ private RegistrationParameterProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the location property: Location of the resource.
@@ -54,7 +62,7 @@ public RegistrationParameter withLocation(Location location) {
* @return the registrationToken value.
*/
public String registrationToken() {
- return this.registrationToken;
+ return this.innerProperties() == null ? null : this.innerProperties().registrationToken();
}
/**
@@ -64,7 +72,10 @@ public String registrationToken() {
* @return the RegistrationParameter object itself.
*/
public RegistrationParameter withRegistrationToken(String registrationToken) {
- this.registrationToken = registrationToken;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RegistrationParameterProperties();
+ }
+ this.innerProperties().withRegistrationToken(registrationToken);
return this;
}
@@ -74,16 +85,18 @@ public RegistrationParameter withRegistrationToken(String registrationToken) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (location() == null) {
+ if (innerProperties() == null) {
throw logger
.logExceptionAsError(
- new IllegalArgumentException("Missing required property location in model RegistrationParameter"));
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model RegistrationParameter"));
+ } else {
+ innerProperties().validate();
}
- if (registrationToken() == null) {
+ if (location() == null) {
throw logger
.logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property registrationToken in model RegistrationParameter"));
+ new IllegalArgumentException("Missing required property location in model RegistrationParameter"));
}
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registrations.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registrations.java
index 0f4b81ae0c207..48637cf5c03be 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registrations.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/Registrations.java
@@ -33,6 +33,26 @@ public interface Registrations {
*/
PagedIterable listByResourceGroup(String resourceGroup, Context context);
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ PagedIterable list();
+
+ /**
+ * Returns a list of all registrations under current subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return pageable list of registrations.
+ */
+ PagedIterable list(Context context);
+
/**
* Returns the properties of an Azure Stack registration.
*
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/VirtualMachineExtensionProductProperties.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/VirtualMachineExtensionProductProperties.java
index 09b34d9934734..9b5037da67929 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/VirtualMachineExtensionProductProperties.java
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/models/VirtualMachineExtensionProductProperties.java
@@ -5,13 +5,12 @@
package com.azure.resourcemanager.azurestack.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestack.fluent.models.Uri;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Product information. */
-@JsonFlatten
@Immutable
public class VirtualMachineExtensionProductProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineExtensionProductProperties.class);
@@ -28,6 +27,12 @@ public class VirtualMachineExtensionProductProperties {
@JsonProperty(value = "isSystemExtension", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isSystemExtension;
+ /*
+ * Specifies a download location where content can be downloaded from.
+ */
+ @JsonProperty(value = "sourceBlob", access = JsonProperty.Access.WRITE_ONLY)
+ private Uri innerSourceBlob;
+
/*
* Indicates if specified product supports multiple extensions.
*/
@@ -53,12 +58,6 @@ public class VirtualMachineExtensionProductProperties {
@JsonProperty(value = "vmScaleSetEnabled", access = JsonProperty.Access.WRITE_ONLY)
private Boolean vmScaleSetEnabled;
- /*
- * The URI.
- */
- @JsonProperty(value = "sourceBlob.uri", access = JsonProperty.Access.WRITE_ONLY)
- private String uri;
-
/**
* Get the computeRole property: Specifies kind of compute role included in the package.
*
@@ -77,6 +76,15 @@ public Boolean isSystemExtension() {
return this.isSystemExtension;
}
+ /**
+ * Get the innerSourceBlob property: Specifies a download location where content can be downloaded from.
+ *
+ * @return the innerSourceBlob value.
+ */
+ private Uri innerSourceBlob() {
+ return this.innerSourceBlob;
+ }
+
/**
* Get the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
*
@@ -119,7 +127,7 @@ public Boolean vmScaleSetEnabled() {
* @return the uri value.
*/
public String uri() {
- return this.uri;
+ return this.innerSourceBlob() == null ? null : this.innerSourceBlob().uri();
}
/**
@@ -128,5 +136,8 @@ public String uri() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerSourceBlob() != null) {
+ innerSourceBlob().validate();
+ }
}
}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileGetSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileGetSamples.java
new file mode 100644
index 0000000000000..b6c6122c272d7
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileGetSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for CloudManifestFile Get. */
+public final class CloudManifestFileGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CloudManifestFile/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of a cloud specific manifest file.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfACloudSpecificManifestFile(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.cloudManifestFiles().getWithResponse("latest", null, Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileListSamples.java
new file mode 100644
index 0000000000000..5dc8e2b9ae2d9
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CloudManifestFileListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for CloudManifestFile List. */
+public final class CloudManifestFileListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CloudManifestFile/List.json
+ */
+ /**
+ * Sample code: Returns the properties of a cloud specific manifest file with latest version.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfACloudSpecificManifestFileWithLatestVersion(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.cloudManifestFiles().listWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsCreateSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsCreateSamples.java
new file mode 100644
index 0000000000000..059955b780d0f
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsCreateSamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+/** Samples for CustomerSubscriptions Create. */
+public final class CustomerSubscriptionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Put.json
+ */
+ /**
+ * Sample code: Creates a new customer subscription under a registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createsANewCustomerSubscriptionUnderARegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .define("E09A4E93-29A7-4EBA-A6D4-76202383F07F")
+ .withExistingRegistration("azurestack", "testregistration")
+ .withTenantId("dbab3982-796f-4d03-9908-044c08aef8a2")
+ .create();
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsDeleteSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsDeleteSamples.java
new file mode 100644
index 0000000000000..309e6d182fe50
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsDeleteSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions Delete. */
+public final class CustomerSubscriptionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Delete.json
+ */
+ /**
+ * Sample code: Deletes a customer subscription under a registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deletesACustomerSubscriptionUnderARegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .deleteWithResponse("azurestack", "testregistration", "E09A4E93-29A7-4EBA-A6D4-76202383F07F", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsGetSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsGetSamples.java
new file mode 100644
index 0000000000000..e62368952ac95
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsGetSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions Get. */
+public final class CustomerSubscriptionsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/Get.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .customerSubscriptions()
+ .getWithResponse("azurestack", "testregistration", "E09A4E93-29A7-4EBA-A6D4-76202383F07F", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsListSamples.java
new file mode 100644
index 0000000000000..bf8c48ce43d7e
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/CustomerSubscriptionsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for CustomerSubscriptions List. */
+public final class CustomerSubscriptionsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/CustomerSubscription/List.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.customerSubscriptions().list("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsCreateOrUpdateSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..6be968c4462ce
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsCreateOrUpdateSamples.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.resourcemanager.azurestack.models.Location;
+
+/** Samples for LinkedSubscriptions CreateOrUpdate. */
+public final class LinkedSubscriptionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Put.json
+ */
+ /**
+ * Sample code: Create or update a Linked Subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createOrUpdateALinkedSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .linkedSubscriptions()
+ .define("testLinkedSubscription")
+ .withLocation(Location.fromString("eastus"))
+ .withExistingResourceGroup("azurestack")
+ .withLinkedSubscriptionId("104fbb77-2b0e-476a-83de-65ad8acd1f0b")
+ .withRegistrationResourceId(
+ "/subscriptions/dd8597b4-8739-4467-8b10-f8679f62bfbf/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/testRegistration")
+ .create();
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsDeleteSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsDeleteSamples.java
new file mode 100644
index 0000000000000..1dd779395c8c0
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsDeleteSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions Delete. */
+public final class LinkedSubscriptionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Delete.json
+ */
+ /**
+ * Sample code: Delete the requested Linked Subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deleteTheRequestedLinkedSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().deleteWithResponse("azurestack", "testlinkedsubscription", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsGetByResourceGroupSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..3f74898398b47
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsGetByResourceGroupSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions GetByResourceGroup. */
+public final class LinkedSubscriptionsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of a Linked Subscription resource.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfALinkedSubscriptionResource(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .linkedSubscriptions()
+ .getByResourceGroupWithResponse("azurestack", "testLinkedSubscription", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListByResourceGroupSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..674a96ca3ecfe
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListByResourceGroupSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions ListByResourceGroup. */
+public final class LinkedSubscriptionsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/List.json
+ */
+ /**
+ * Sample code: Returns a list of all linked subscriptions.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllLinkedSubscriptions(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().listByResourceGroup("azurestack", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListSamples.java
new file mode 100644
index 0000000000000..372f012c85fd6
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for LinkedSubscriptions List. */
+public final class LinkedSubscriptionsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/ListBySubscription.json
+ */
+ /**
+ * Sample code: Returns a list of all linked subscriptions.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllLinkedSubscriptions(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.linkedSubscriptions().list(Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsUpdateSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsUpdateSamples.java
new file mode 100644
index 0000000000000..b803aea085b51
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/LinkedSubscriptionsUpdateSamples.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestack.models.LinkedSubscription;
+
+/** Samples for LinkedSubscriptions Update. */
+public final class LinkedSubscriptionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/LinkedSubscription/Patch.json
+ */
+ /**
+ * Sample code: Patch a Linked Subscription resource.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void patchALinkedSubscriptionResource(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ LinkedSubscription resource =
+ manager
+ .linkedSubscriptions()
+ .getByResourceGroupWithResponse("azurestack", "testLinkedSubscription", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withLinkedSubscriptionId("104fbb77-2b0e-476a-83de-65ad8acd1f0b")
+ .withRegistrationResourceId(
+ "/subscriptions/dd8597b4-8739-4467-8b10-f8679f62bfbf/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/testRegistration")
+ .apply();
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/OperationsListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..d3eb49c689f23
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/OperationsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Operation/List.json
+ */
+ /**
+ * Sample code: Returns the list of supported REST operations.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheListOfSupportedRESTOperations(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductSamples.java
new file mode 100644
index 0000000000000..3e9764fec4da0
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductSamples.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products GetProduct. */
+public final class ProductsGetProductSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/GetPost.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .getProductWithResponse(
+ "azurestack",
+ "testregistration",
+ "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1",
+ null,
+ Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductsSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductsSamples.java
new file mode 100644
index 0000000000000..8cfb364ca2ef6
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetProductsSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products GetProducts. */
+public final class ProductsGetProductsSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/ListPost.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.products().getProductsWithResponse("azurestack", "testregistration", "_all", null, Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetSamples.java
new file mode 100644
index 0000000000000..8d31cf8919379
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsGetSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products Get. */
+public final class ProductsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/Get.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .getWithResponse(
+ "azurestack", "testregistration", "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListDetailsSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListDetailsSamples.java
new file mode 100644
index 0000000000000..9d8516a20c384
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListDetailsSamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products ListDetails. */
+public final class ProductsListDetailsSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/Post.json
+ */
+ /**
+ * Sample code: Returns the extended properties of a product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheExtendedPropertiesOfAProduct(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .listDetailsWithResponse(
+ "azurestack", "testregistration", "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListSamples.java
new file mode 100644
index 0000000000000..94903d3879f71
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products List. */
+public final class ProductsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/List.json
+ */
+ /**
+ * Sample code: Returns a list of products.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfProducts(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.products().list("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsUploadLogSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsUploadLogSamples.java
new file mode 100644
index 0000000000000..2e53d287438a9
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/ProductsUploadLogSamples.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Products UploadLog. */
+public final class ProductsUploadLogSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Product/UploadLog.json
+ */
+ /**
+ * Sample code: Returns the specified product.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsTheSpecifiedProduct(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .products()
+ .uploadLogWithResponse(
+ "azurestack",
+ "testregistration",
+ "Microsoft.OSTCExtensions.VMAccessForLinux.1.4.7.1",
+ null,
+ Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsCreateOrUpdateSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..6735848781377
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsCreateOrUpdateSamples.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.resourcemanager.azurestack.models.Location;
+
+/** Samples for Registrations CreateOrUpdate. */
+public final class RegistrationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Put.json
+ */
+ /**
+ * Sample code: Create or update an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void createOrUpdateAnAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager
+ .registrations()
+ .define("testregistration")
+ .withLocation(Location.GLOBAL)
+ .withExistingResourceGroup("azurestack")
+ .withRegistrationToken(
+ "EyjIAWXSAw5nTw9KZWWiOiJeZxZlbg9wBwvUdCiSIM9iaMVjdeLkijoinwIzyJa2Ytgtowm2yy00OdG4lTlLyJmtztHjZGfJZTC0NZK1iIWiY2XvdWRJzCi6iJy5nDy0oDk1LTNHmWeTnDUwyS05oDI0LTrINzYwoGq5mjAzziIsim1HCmtldHBsYwnLu3LuZGljYXrpB25FBmfIbgVkIJp0CNvLLCJOYXJkd2FYzuLUZM8iOlt7IM51bunvcMVZiJoYlCjcaw9ZiJPBIjNkzDJHmda3yte5ndqZMdq4YmZkZmi5oDM3OTY3ZwNMIL0SIM5PyYI6WyJLZTy0ztJJMwZKy2m0OWNLODDLMwm2zTm0ymzKyjmWySisiJA3njlHmtdlY2q4NjRjnwFIZtC1YZi5ZGyZodM3Y2vjIl0siMnwDsi6wyi2oDUZoTbiY2RhNDa0ymrKoWe4YtK5otblzWrJzGyzNCISIjmYnzC4M2vmnZdIoDRKM2i5ytfkmJlhnDc1zdhLzWm1il0sim5HBwuiOijIqzF1MTvhmDIXmIIsimrpc2SiolsioWNlZjVhnZM1otQ0nDu3NmjlN2M3zmfjzmyZMTJhZtiiLcjLZjLmmZJhmWVhytG0NTu0OTqZNWu1Mda0MZbIYtfjyijdLCj1DWlKijoinwM5Mwu3NjytMju5Os00oTIwlWi0OdmTnGzHotiWm2RjyTCxIIwiBWvTb3J5ijPbijAYZDA3M2fjNzu0YTRMZTfhodkxzDnkogY5ZtAWzdyXIiwINZcWzThLnDQ4otrJndAzZGI5MGzlYtY1ZJA5ZdfiNMQIXX1DlcJpC3n1zxiiOijZb21lB25LIIWIdmVyC2LVbiI6IJeuMcJ9")
+ .create();
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsDeleteSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsDeleteSamples.java
new file mode 100644
index 0000000000000..23d977f697fa3
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsDeleteSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations Delete. */
+public final class RegistrationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Delete.json
+ */
+ /**
+ * Sample code: Delete the requested Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void deleteTheRequestedAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().deleteWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsEnableRemoteManagementSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsEnableRemoteManagementSamples.java
new file mode 100644
index 0000000000000..e062a1ac286ae
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsEnableRemoteManagementSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations EnableRemoteManagement. */
+public final class RegistrationsEnableRemoteManagementSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/RemoteManagement/Post.json
+ */
+ /**
+ * Sample code: Returns empty response for successful action..
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsEmptyResponseForSuccessfulAction(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().enableRemoteManagementWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetActivationKeySamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetActivationKeySamples.java
new file mode 100644
index 0000000000000..09a9db32b13d1
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetActivationKeySamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations GetActivationKey. */
+public final class RegistrationsGetActivationKeySamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Post.json
+ */
+ /**
+ * Sample code: Returns Azure Stack Activation Key.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAzureStackActivationKey(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().getActivationKeyWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetByResourceGroupSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..461c606ff54a9
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsGetByResourceGroupSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations GetByResourceGroup. */
+public final class RegistrationsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Get.json
+ */
+ /**
+ * Sample code: Returns the properties of an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsThePropertiesOfAnAzureStackRegistration(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().getByResourceGroupWithResponse("azurestack", "testregistration", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListByResourceGroupSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..bf593c40f94cd
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations ListByResourceGroup. */
+public final class RegistrationsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/List.json
+ */
+ /**
+ * Sample code: Returns a list of all registrations.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllRegistrations(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().listByResourceGroup("azurestack", Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListSamples.java
new file mode 100644
index 0000000000000..9d66d5487e464
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Registrations List. */
+public final class RegistrationsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/ListBySubscription.json
+ */
+ /**
+ * Sample code: Returns a list of all registrations under current subscription.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void returnsAListOfAllRegistrationsUnderCurrentSubscription(
+ com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ manager.registrations().list(Context.NONE);
+ }
+}
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsUpdateSamples.java b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsUpdateSamples.java
new file mode 100644
index 0000000000000..3c424b713096d
--- /dev/null
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/src/samples/java/com/azure/resourcemanager/azurestack/generated/RegistrationsUpdateSamples.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestack.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestack.models.Registration;
+
+/** Samples for Registrations Update. */
+public final class RegistrationsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/examples/Registration/Patch.json
+ */
+ /**
+ * Sample code: Patch an Azure Stack registration.
+ *
+ * @param manager Entry point to AzureStackManager.
+ */
+ public static void patchAnAzureStackRegistration(com.azure.resourcemanager.azurestack.AzureStackManager manager) {
+ Registration resource =
+ manager
+ .registrations()
+ .getByResourceGroupWithResponse("azurestack", "testregistration", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withRegistrationToken(
+ "EyjIAWXSAw5nTw9KZWWiOiJeZxZlbg9wBwvUdCiSIM9iaMVjdeLkijoinwIzyJa2Ytgtowm2yy00OdG4lTlLyJmtztHjZGfJZTC0NZK1iIWiY2XvdWRJzCi6iJy5nDy0oDk1LTNHmWeTnDUwyS05oDI0LTrINzYwoGq5mjAzziIsim1HCmtldHBsYwnLu3LuZGljYXrpB25FBmfIbgVkIJp0CNvLLCJOYXJkd2FYzuLUZM8iOlt7IM51bunvcMVZiJoYlCjcaw9ZiJPBIjNkzDJHmda3yte5ndqZMdq4YmZkZmi5oDM3OTY3ZwNMIL0SIM5PyYI6WyJLZTy0ztJJMwZKy2m0OWNLODDLMwm2zTm0ymzKyjmWySisiJA3njlHmtdlY2q4NjRjnwFIZtC1YZi5ZGyZodM3Y2vjIl0siMnwDsi6wyi2oDUZoTbiY2RhNDa0ymrKoWe4YtK5otblzWrJzGyzNCISIjmYnzC4M2vmnZdIoDRKM2i5ytfkmJlhnDc1zdhLzWm1il0sim5HBwuiOijIqzF1MTvhmDIXmIIsimrpc2SiolsioWNlZjVhnZM1otQ0nDu3NmjlN2M3zmfjzmyZMTJhZtiiLcjLZjLmmZJhmWVhytG0NTu0OTqZNWu1Mda0MZbIYtfjyijdLCj1DWlKijoinwM5Mwu3NjytMju5Os00oTIwlWi0OdmTnGzHotiWm2RjyTCxIIwiBWvTb3J5ijPbijAYZDA3M2fjNzu0YTRMZTfhodkxzDnkogY5ZtAWzdyXIiwINZcWzThLnDQ4otrJndAzZGI5MGzlYtY1ZJA5ZdfiNMQIXX1DlcJpC3n1zxiiOijZb21lB25LIIWIdmVyC2LVbiI6IJeuMcJ9")
+ .apply();
+ }
+}