diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
index 7c9638cae4706..60b26187d3db1 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-03-18)
+- Azure Resource Manager AzureStackHci client library for Java. This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-preview-2021-07. 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/azurestackhci/azure-resourcemanager-azurestackhci/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
index 70d752936ae75..b71169d723d84 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager AzureStackHci client library for Java.
-This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2020-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-preview-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-azurestackhci
- 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/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md
new file mode 100644
index 0000000000000..c43897ab2b75f
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md
@@ -0,0 +1,938 @@
+# Code snippets and samples
+
+
+## GalleryimagesOperation
+
+- [CreateOrUpdate](#galleryimagesoperation_createorupdate)
+- [Delete](#galleryimagesoperation_delete)
+- [GetByResourceGroup](#galleryimagesoperation_getbyresourcegroup)
+- [List](#galleryimagesoperation_list)
+- [ListByResourceGroup](#galleryimagesoperation_listbyresourcegroup)
+- [Update](#galleryimagesoperation_update)
+
+## NetworkinterfacesOperation
+
+- [CreateOrUpdate](#networkinterfacesoperation_createorupdate)
+- [Delete](#networkinterfacesoperation_delete)
+- [GetByResourceGroup](#networkinterfacesoperation_getbyresourcegroup)
+- [List](#networkinterfacesoperation_list)
+- [ListByResourceGroup](#networkinterfacesoperation_listbyresourcegroup)
+- [Update](#networkinterfacesoperation_update)
+
+## VirtualharddisksOperation
+
+- [CreateOrUpdate](#virtualharddisksoperation_createorupdate)
+- [Delete](#virtualharddisksoperation_delete)
+- [GetByResourceGroup](#virtualharddisksoperation_getbyresourcegroup)
+- [List](#virtualharddisksoperation_list)
+- [ListByResourceGroup](#virtualharddisksoperation_listbyresourcegroup)
+- [Update](#virtualharddisksoperation_update)
+
+## VirtualmachinesOperation
+
+- [CreateOrUpdate](#virtualmachinesoperation_createorupdate)
+- [Delete](#virtualmachinesoperation_delete)
+- [GetByResourceGroup](#virtualmachinesoperation_getbyresourcegroup)
+- [List](#virtualmachinesoperation_list)
+- [ListByResourceGroup](#virtualmachinesoperation_listbyresourcegroup)
+- [Restart](#virtualmachinesoperation_restart)
+- [Start](#virtualmachinesoperation_start)
+- [Stop](#virtualmachinesoperation_stop)
+- [Update](#virtualmachinesoperation_update)
+
+## VirtualnetworksOperation
+
+- [CreateOrUpdate](#virtualnetworksoperation_createorupdate)
+- [Delete](#virtualnetworksoperation_delete)
+- [GetByResourceGroup](#virtualnetworksoperation_getbyresourcegroup)
+- [List](#virtualnetworksoperation_list)
+- [ListByResourceGroup](#virtualnetworksoperation_listbyresourcegroup)
+- [Update](#virtualnetworksoperation_update)
+### GalleryimagesOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesExtendedLocation;
+
+/** Samples for GalleryimagesOperation CreateOrUpdate. */
+public final class GalleryimagesOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/PutGalleryImage.json
+ */
+ /**
+ * Sample code: PutGalleryImage.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void putGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .galleryimagesOperations()
+ .define("test-gallery-image")
+ .withRegion("West US2")
+ .withExistingResourceGroup("test-rg")
+ .withExtendedLocation(
+ new GalleryimagesExtendedLocation()
+ .withType("CustomLocation")
+ .withName(
+ "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"))
+ .withContainerName("Default_Container")
+ .withImagePath("C:\\test.vhdx")
+ .create();
+ }
+}
+```
+
+### GalleryimagesOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryimagesOperation Delete. */
+public final class GalleryimagesOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/DeleteGalleryImage.json
+ */
+ /**
+ * Sample code: DeleteGalleryImage.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.galleryimagesOperations().deleteWithResponse("test-rg", "test-gallery-image", Context.NONE);
+ }
+}
+```
+
+### GalleryimagesOperation_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryimagesOperation GetByResourceGroup. */
+public final class GalleryimagesOperationGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/GetGalleryImage.json
+ */
+ /**
+ * Sample code: GetGalleryImage.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.galleryimagesOperations().getByResourceGroupWithResponse("test-rg", "test-gallery-image", Context.NONE);
+ }
+}
+```
+
+### GalleryimagesOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryimagesOperation List. */
+public final class GalleryimagesOperationListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListGalleryImageBySubscription.json
+ */
+ /**
+ * Sample code: ListGalleryImageByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listGalleryImageByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.galleryimagesOperations().list(Context.NONE);
+ }
+}
+```
+
+### GalleryimagesOperation_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryimagesOperation ListByResourceGroup. */
+public final class GalleryimagesOperationListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListGalleryImageByResourceGroup.json
+ */
+ /**
+ * Sample code: ListGalleryImageByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listGalleryImageByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.galleryimagesOperations().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### GalleryimagesOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Galleryimages;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GalleryimagesOperation Update. */
+public final class GalleryimagesOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/UpdateGalleryImage.json
+ */
+ /**
+ * Sample code: UpdateGalleryImage.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Galleryimages resource =
+ manager
+ .galleryimagesOperations()
+ .getByResourceGroupWithResponse("test-rg", "test-gallery-image", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("additionalProperties", "sample")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### NetworkinterfacesOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestackhci.models.IpConfiguration;
+import com.azure.resourcemanager.azurestackhci.models.IpConfigurationProperties;
+import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesExtendedLocation;
+import java.util.Arrays;
+
+/** Samples for NetworkinterfacesOperation CreateOrUpdate. */
+public final class NetworkinterfacesOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/PutNetworkInterface.json
+ */
+ /**
+ * Sample code: PutNetworkInterface.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .networkinterfacesOperations()
+ .define("test-nic")
+ .withRegion("West US2")
+ .withExistingResourceGroup("test-rg")
+ .withExtendedLocation(
+ new NetworkinterfacesExtendedLocation()
+ .withType("CustomLocation")
+ .withName(
+ "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"))
+ .withIpConfigurations(
+ Arrays
+ .asList(
+ new IpConfiguration()
+ .withName("ipconfig-sample")
+ .withProperties(
+ new IpConfigurationProperties()
+ .withSubnet(new IpConfigurationPropertiesSubnet().withId("test-vnet")))))
+ .create();
+ }
+}
+```
+
+### NetworkinterfacesOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NetworkinterfacesOperation Delete. */
+public final class NetworkinterfacesOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/DeleteNetworkInterface.json
+ */
+ /**
+ * Sample code: DeleteNetworkInterface.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.networkinterfacesOperations().deleteWithResponse("test-rg", "test-nic", Context.NONE);
+ }
+}
+```
+
+### NetworkinterfacesOperation_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NetworkinterfacesOperation GetByResourceGroup. */
+public final class NetworkinterfacesOperationGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/GetNetworkInterface.json
+ */
+ /**
+ * Sample code: GetNetworkInterface.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.networkinterfacesOperations().getByResourceGroupWithResponse("test-rg", "test-nic", Context.NONE);
+ }
+}
+```
+
+### NetworkinterfacesOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NetworkinterfacesOperation List. */
+public final class NetworkinterfacesOperationListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListNetworkInterfaceBySubscription.json
+ */
+ /**
+ * Sample code: ListNetworkInterfaceBySubscription.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listNetworkInterfaceBySubscription(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.networkinterfacesOperations().list(Context.NONE);
+ }
+}
+```
+
+### NetworkinterfacesOperation_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NetworkinterfacesOperation ListByResourceGroup. */
+public final class NetworkinterfacesOperationListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListNetworkInterfaceByResourceGroup.json
+ */
+ /**
+ * Sample code: ListNetworkInterfaceByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listNetworkInterfaceByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.networkinterfacesOperations().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### NetworkinterfacesOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Networkinterfaces;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for NetworkinterfacesOperation Update. */
+public final class NetworkinterfacesOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/UpdateNetworkInterface.json
+ */
+ /**
+ * Sample code: UpdateNetworkInterface.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Networkinterfaces resource =
+ manager
+ .networkinterfacesOperations()
+ .getByResourceGroupWithResponse("test-rg", "test-nic", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("additionalProperties", "sample")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualharddisksOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestackhci.models.VirtualharddisksExtendedLocation;
+
+/** Samples for VirtualharddisksOperation CreateOrUpdate. */
+public final class VirtualharddisksOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/PutVirtualHardDisk.json
+ */
+ /**
+ * Sample code: PutVirtualHardDisk.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void putVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .virtualharddisksOperations()
+ .define("test-vhd")
+ .withRegion("West US2")
+ .withExistingResourceGroup("test-rg")
+ .withExtendedLocation(
+ new VirtualharddisksExtendedLocation()
+ .withType("CustomLocation")
+ .withName(
+ "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"))
+ .withDiskSizeBytes(32L)
+ .create();
+ }
+}
+```
+
+### VirtualharddisksOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualharddisksOperation Delete. */
+public final class VirtualharddisksOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/DeleteVirtualHardDisk.json
+ */
+ /**
+ * Sample code: DeleteVirtualHardDisk.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualharddisksOperations().deleteWithResponse("test-rg", "test-vhd", Context.NONE);
+ }
+}
+```
+
+### VirtualharddisksOperation_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualharddisksOperation GetByResourceGroup. */
+public final class VirtualharddisksOperationGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/GetVirtualHardDisk.json
+ */
+ /**
+ * Sample code: GetVirtualHardDisk.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualharddisksOperations().getByResourceGroupWithResponse("test-rg", "test-vhd", Context.NONE);
+ }
+}
+```
+
+### VirtualharddisksOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualharddisksOperation List. */
+public final class VirtualharddisksOperationListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualHardDiskBySubscription.json
+ */
+ /**
+ * Sample code: ListVirtualHardDiskByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualHardDiskByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualharddisksOperations().list(Context.NONE);
+ }
+}
+```
+
+### VirtualharddisksOperation_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualharddisksOperation ListByResourceGroup. */
+public final class VirtualharddisksOperationListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualHardDiskByResourceGroup.json
+ */
+ /**
+ * Sample code: ListVirtualHardDiskByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualHardDiskByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualharddisksOperations().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### VirtualharddisksOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Virtualharddisks;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualharddisksOperation Update. */
+public final class VirtualharddisksOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/UpdateVirtualHardDisk.json
+ */
+ /**
+ * Sample code: UpdateVirtualHardDisk.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Virtualharddisks resource =
+ manager
+ .virtualharddisksOperations()
+ .getByResourceGroupWithResponse("test-rg", "test-vhd", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("additionalProperties", "sample")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualmachinesOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesHardwareProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesNetworkProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesOsProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesStorageProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesStorageProfileImageReference;
+import java.util.Arrays;
+
+/** Samples for VirtualmachinesOperation CreateOrUpdate. */
+public final class VirtualmachinesOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/PutVirtualMachine.json
+ */
+ /**
+ * Sample code: PutVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void putVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .virtualmachinesOperations()
+ .define("test-vm")
+ .withRegion("West US2")
+ .withExistingResourceGroup("test-rg")
+ .withExtendedLocation(
+ new VirtualmachinesExtendedLocation()
+ .withType("CustomLocation")
+ .withName(
+ "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"))
+ .withHardwareProfile(new VirtualmachinesPropertiesHardwareProfile().withVmSize("Default"))
+ .withNetworkProfile(
+ new VirtualmachinesPropertiesNetworkProfile()
+ .withNetworkInterfaces(
+ Arrays
+ .asList(
+ new VirtualmachinesPropertiesNetworkProfileNetworkInterfacesItem().withId("test-nic"))))
+ .withOsProfile(
+ new VirtualmachinesPropertiesOsProfile()
+ .withAdminPassword("password")
+ .withAdminUsername("localadmin")
+ .withComputerName("luamaster"))
+ .withStorageProfile(
+ new VirtualmachinesPropertiesStorageProfile()
+ .withImageReference(
+ new VirtualmachinesPropertiesStorageProfileImageReference().withName("test-gallery-image")))
+ .create();
+ }
+}
+```
+
+### VirtualmachinesOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation Delete. */
+public final class VirtualmachinesOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/DeleteVirtualMachine.json
+ */
+ /**
+ * Sample code: DeleteVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().deleteWithResponse("test-rg", "test-vm", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation GetByResourceGroup. */
+public final class VirtualmachinesOperationGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/GetVirtualMachine.json
+ */
+ /**
+ * Sample code: GetVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().getByResourceGroupWithResponse("test-rg", "test-vm", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation List. */
+public final class VirtualmachinesOperationListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualMachineBySubscription.json
+ */
+ /**
+ * Sample code: ListVirtualMachineBySubscription.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualMachineBySubscription(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().list(Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation ListByResourceGroup. */
+public final class VirtualmachinesOperationListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualMachineByResourceGroup.json
+ */
+ /**
+ * Sample code: ListVirtualMachineByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualMachineByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_Restart
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation Restart. */
+public final class VirtualmachinesOperationRestartSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/RestartVirtualMachine.json
+ */
+ /**
+ * Sample code: RestartVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void restartVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().restart("test-rg", "test-vm", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_Start
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation Start. */
+public final class VirtualmachinesOperationStartSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/StartVirtualMachine.json
+ */
+ /**
+ * Sample code: StartVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void startVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().start("test-rg", "test-vm", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_Stop
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualmachinesOperation Stop. */
+public final class VirtualmachinesOperationStopSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/StopVirtualMachine.json
+ */
+ /**
+ * Sample code: StopVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void stopVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualmachinesOperations().stop("test-rg", "test-vm", Context.NONE);
+ }
+}
+```
+
+### VirtualmachinesOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Virtualmachines;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualmachinesOperation Update. */
+public final class VirtualmachinesOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/UpdateVirtualMachine.json
+ */
+ /**
+ * Sample code: UpdateVirtualMachine.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Virtualmachines resource =
+ manager
+ .virtualmachinesOperations()
+ .getByResourceGroupWithResponse("test-rg", "test-vm", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("additionalProperties", "sample")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualnetworksOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.azurestackhci.models.NetworkTypeEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksExtendedLocation;
+
+/** Samples for VirtualnetworksOperation CreateOrUpdate. */
+public final class VirtualnetworksOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/PutVirtualNetwork.json
+ */
+ /**
+ * Sample code: PutVirtualNetwork.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void putVirtualNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .virtualnetworksOperations()
+ .define("test-vnet")
+ .withRegion("West US2")
+ .withExistingResourceGroup("test-rg")
+ .withExtendedLocation(
+ new VirtualnetworksExtendedLocation()
+ .withType("CustomLocation")
+ .withName(
+ "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"))
+ .withNetworkType(NetworkTypeEnum.TRANSPARENT)
+ .create();
+ }
+}
+```
+
+### VirtualnetworksOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualnetworksOperation Delete. */
+public final class VirtualnetworksOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/DeleteVirtualNetwork.json
+ */
+ /**
+ * Sample code: DeleteVirtualNetwork.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteVirtualNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualnetworksOperations().deleteWithResponse("test-rg", "test-vnet", Context.NONE);
+ }
+}
+```
+
+### VirtualnetworksOperation_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualnetworksOperation GetByResourceGroup. */
+public final class VirtualnetworksOperationGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/GetVirtualNetwork.json
+ */
+ /**
+ * Sample code: GetVirtualNetwork.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getVirtualNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualnetworksOperations().getByResourceGroupWithResponse("test-rg", "test-vnet", Context.NONE);
+ }
+}
+```
+
+### VirtualnetworksOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualnetworksOperation List. */
+public final class VirtualnetworksOperationListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualNetworkBySubscription.json
+ */
+ /**
+ * Sample code: ListVirtualNetworkBySubscription.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualNetworkBySubscription(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualnetworksOperations().list(Context.NONE);
+ }
+}
+```
+
+### VirtualnetworksOperation_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualnetworksOperation ListByResourceGroup. */
+public final class VirtualnetworksOperationListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/ListVirtualNetworkByResourceGroup.json
+ */
+ /**
+ * Sample code: ListVirtualNetworkByResourceGroup.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listVirtualNetworkByResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.virtualnetworksOperations().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### VirtualnetworksOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Virtualnetworks;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualnetworksOperation Update. */
+public final class VirtualnetworksOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-07-01-preview/examples/UpdateVirtualNetwork.json
+ */
+ /**
+ * Sample code: UpdateVirtualNetwork.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateVirtualNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Virtualnetworks resource =
+ manager
+ .virtualnetworksOperations()
+ .getByResourceGroupWithResponse("test-rg", "test-vnet", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("additionalProperties", "sample")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
index 7ead6ca264d40..071082c0a5b6b 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
@@ -1,55 +1,55 @@
- 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-azurestackhci
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-azurestackhci
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for AzureStackHci Management
- This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2020-10.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for AzureStackHci Management
+ This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-preview-2021-07.
+ 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
-
-
-
- com.azure
- azure-core
- 1.26.0
-
-
- com.azure
- azure-core-management
- 1.5.3
-
-
+
+ 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
+
+
+
+ com.azure
+ azure-core
+ 1.26.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.3
+
+
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java
index 3e48e353084b4..74b2ffbba0bc2 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.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,26 +17,44 @@
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;
import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient;
import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciClientBuilder;
-import com.azure.resourcemanager.azurestackhci.implementation.ClustersImpl;
+import com.azure.resourcemanager.azurestackhci.implementation.GalleryimagesOperationsImpl;
+import com.azure.resourcemanager.azurestackhci.implementation.NetworkinterfacesOperationsImpl;
import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl;
-import com.azure.resourcemanager.azurestackhci.models.Clusters;
+import com.azure.resourcemanager.azurestackhci.implementation.VirtualharddisksOperationsImpl;
+import com.azure.resourcemanager.azurestackhci.implementation.VirtualmachinesOperationsImpl;
+import com.azure.resourcemanager.azurestackhci.implementation.VirtualnetworksOperationsImpl;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesOperations;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesOperations;
import com.azure.resourcemanager.azurestackhci.models.Operations;
+import com.azure.resourcemanager.azurestackhci.models.VirtualharddisksOperations;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesOperations;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksOperations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to AzureStackHciManager. Azure Stack HCI management service. */
public final class AzureStackHciManager {
- private Operations operations;
+ private GalleryimagesOperations galleryimagesOperations;
+
+ private NetworkinterfacesOperations networkinterfacesOperations;
+
+ private VirtualharddisksOperations virtualharddisksOperations;
- private Clusters clusters;
+ private VirtualmachinesOperations virtualmachinesOperations;
+
+ private VirtualnetworksOperations virtualnetworksOperations;
+
+ private Operations operations;
private final AzureStackHciClient clientObject;
@@ -76,11 +94,12 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -120,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.
*
@@ -138,9 +168,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -176,20 +208,33 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil
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 =
@@ -201,6 +246,51 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil
}
}
+ /** @return Resource collection API of GalleryimagesOperations. */
+ public GalleryimagesOperations galleryimagesOperations() {
+ if (this.galleryimagesOperations == null) {
+ this.galleryimagesOperations =
+ new GalleryimagesOperationsImpl(clientObject.getGalleryimagesOperations(), this);
+ }
+ return galleryimagesOperations;
+ }
+
+ /** @return Resource collection API of NetworkinterfacesOperations. */
+ public NetworkinterfacesOperations networkinterfacesOperations() {
+ if (this.networkinterfacesOperations == null) {
+ this.networkinterfacesOperations =
+ new NetworkinterfacesOperationsImpl(clientObject.getNetworkinterfacesOperations(), this);
+ }
+ return networkinterfacesOperations;
+ }
+
+ /** @return Resource collection API of VirtualharddisksOperations. */
+ public VirtualharddisksOperations virtualharddisksOperations() {
+ if (this.virtualharddisksOperations == null) {
+ this.virtualharddisksOperations =
+ new VirtualharddisksOperationsImpl(clientObject.getVirtualharddisksOperations(), this);
+ }
+ return virtualharddisksOperations;
+ }
+
+ /** @return Resource collection API of VirtualmachinesOperations. */
+ public VirtualmachinesOperations virtualmachinesOperations() {
+ if (this.virtualmachinesOperations == null) {
+ this.virtualmachinesOperations =
+ new VirtualmachinesOperationsImpl(clientObject.getVirtualmachinesOperations(), this);
+ }
+ return virtualmachinesOperations;
+ }
+
+ /** @return Resource collection API of VirtualnetworksOperations. */
+ public VirtualnetworksOperations virtualnetworksOperations() {
+ if (this.virtualnetworksOperations == null) {
+ this.virtualnetworksOperations =
+ new VirtualnetworksOperationsImpl(clientObject.getVirtualnetworksOperations(), this);
+ }
+ return virtualnetworksOperations;
+ }
+
/** @return Resource collection API of Operations. */
public Operations operations() {
if (this.operations == null) {
@@ -209,14 +299,6 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Clusters. */
- public Clusters clusters() {
- if (this.clusters == null) {
- this.clusters = new ClustersImpl(clientObject.getClusters(), this);
- }
- return clusters;
- }
-
/**
* @return Wrapped service client AzureStackHciClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
index 277e14ea65dbb..532f8c71dbecd 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
@@ -45,16 +45,44 @@ public interface AzureStackHciClient {
Duration getDefaultPollInterval();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the GalleryimagesOperationsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the GalleryimagesOperationsClient object.
*/
- OperationsClient getOperations();
+ GalleryimagesOperationsClient getGalleryimagesOperations();
+
+ /**
+ * Gets the NetworkinterfacesOperationsClient object to access its operations.
+ *
+ * @return the NetworkinterfacesOperationsClient object.
+ */
+ NetworkinterfacesOperationsClient getNetworkinterfacesOperations();
+
+ /**
+ * Gets the VirtualharddisksOperationsClient object to access its operations.
+ *
+ * @return the VirtualharddisksOperationsClient object.
+ */
+ VirtualharddisksOperationsClient getVirtualharddisksOperations();
/**
- * Gets the ClustersClient object to access its operations.
+ * Gets the VirtualmachinesOperationsClient object to access its operations.
*
- * @return the ClustersClient object.
+ * @return the VirtualmachinesOperationsClient object.
*/
- ClustersClient getClusters();
+ VirtualmachinesOperationsClient getVirtualmachinesOperations();
+
+ /**
+ * Gets the VirtualnetworksOperationsClient object to access its operations.
+ *
+ * @return the VirtualnetworksOperationsClient object.
+ */
+ VirtualnetworksOperationsClient getVirtualnetworksOperations();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryimagesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryimagesOperationsClient.java
new file mode 100644
index 0000000000000..3cea558e92768
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryimagesOperationsClient.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryimagesInner;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesPatch;
+
+/** An instance of this class provides access to all the operations defined in GalleryimagesOperationsClient. */
+public interface GalleryimagesOperationsClient {
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GalleryimagesInner getByResourceGroup(String resourceGroupName, String galleryimagesName);
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String galleryimagesName, Context context);
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link SyncPoller} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GalleryimagesInner> beginCreateOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages);
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link SyncPoller} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GalleryimagesInner> beginCreateOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context);
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GalleryimagesInner createOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages);
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GalleryimagesInner createOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context);
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String galleryimagesName);
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String galleryimagesName, Context context);
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GalleryimagesInner update(String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages);
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages, Context context);
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkinterfacesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkinterfacesOperationsClient.java
new file mode 100644
index 0000000000000..2610865606f08
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkinterfacesOperationsClient.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.NetworkinterfacesInner;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesPatch;
+
+/** An instance of this class provides access to all the operations defined in NetworkinterfacesOperationsClient. */
+public interface NetworkinterfacesOperationsClient {
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NetworkinterfacesInner getByResourceGroup(String resourceGroupName, String networkinterfacesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @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 the networkinterfaces resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String networkinterfacesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link SyncPoller} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NetworkinterfacesInner> beginCreateOrUpdate(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link SyncPoller} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NetworkinterfacesInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NetworkinterfacesInner createOrUpdate(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NetworkinterfacesInner createOrUpdate(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String networkinterfacesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String networkinterfacesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NetworkinterfacesInner update(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesPatch networkinterfaces);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesPatch networkinterfaces,
+ Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
index 6a1af013a2fbc..0b8e907abe681 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
@@ -8,7 +8,7 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.azurestackhci.fluent.models.AvailableOperationsInner;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
@@ -17,10 +17,10 @@ public interface OperationsClient {
*
* @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 available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AvailableOperationsInner list();
+ OperationListResultInner list();
/**
* List all available Microsoft.AzureStackHCI provider operations.
@@ -29,8 +29,8 @@ public interface OperationsClient {
* @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 available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(Context context);
+ Response listWithResponse(Context context);
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualharddisksOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualharddisksOperationsClient.java
new file mode 100644
index 0000000000000..c5cbba1a7e149
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualharddisksOperationsClient.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualharddisksInner;
+import com.azure.resourcemanager.azurestackhci.models.VirtualharddisksPatch;
+
+/** An instance of this class provides access to all the operations defined in VirtualharddisksOperationsClient. */
+public interface VirtualharddisksOperationsClient {
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @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 the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualharddisksInner getByResourceGroup(String resourceGroupName, String virtualharddisksName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @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 the virtualharddisks resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String virtualharddisksName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualharddisksInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksInner virtualharddisks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualharddisksInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksInner virtualharddisks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource definition.
+ * @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 the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualharddisksInner createOrUpdate(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksInner virtualharddisks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource definition.
+ * @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 the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualharddisksInner createOrUpdate(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksInner virtualharddisks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String virtualharddisksName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String virtualharddisksName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource patch definition.
+ * @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 the virtualharddisks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualharddisksInner update(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksPatch virtualharddisks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualharddisksName The virtualharddisksName parameter.
+ * @param virtualharddisks The virtualharddisks resource patch definition.
+ * @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 the virtualharddisks resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String virtualharddisksName, VirtualharddisksPatch virtualharddisks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualmachinesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualmachinesOperationsClient.java
new file mode 100644
index 0000000000000..eac9436995e06
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualmachinesOperationsClient.java
@@ -0,0 +1,318 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualmachinesInner;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPatch;
+
+/** An instance of this class provides access to all the operations defined in VirtualmachinesOperationsClient. */
+public interface VirtualmachinesOperationsClient {
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualmachinesInner getByResourceGroup(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the virtualmachines resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualmachinesInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesInner virtualmachines);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualmachinesInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesInner virtualmachines, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource definition.
+ * @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 the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualmachinesInner createOrUpdate(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesInner virtualmachines);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource definition.
+ * @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 the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualmachinesInner createOrUpdate(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesInner virtualmachines, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource patch definition.
+ * @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 the virtualmachines resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualmachinesInner update(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesPatch virtualmachines);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @param virtualmachines The virtualmachines resource patch definition.
+ * @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 the virtualmachines resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String virtualmachinesName, VirtualmachinesPatch virtualmachines, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(
+ String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(
+ String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String virtualmachinesName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualmachinesName The virtualmachinesName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String virtualmachinesName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualnetworksOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualnetworksOperationsClient.java
new file mode 100644
index 0000000000000..f1e76080ea175
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualnetworksOperationsClient.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualnetworksInner;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksPatch;
+
+/** An instance of this class provides access to all the operations defined in VirtualnetworksOperationsClient. */
+public interface VirtualnetworksOperationsClient {
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @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 the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualnetworksInner getByResourceGroup(String resourceGroupName, String virtualnetworksName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @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 the virtualnetworks resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String virtualnetworksName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualnetworksInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksInner virtualnetworks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource definition.
+ * @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 the {@link SyncPoller} for polling of the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VirtualnetworksInner> beginCreateOrUpdate(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksInner virtualnetworks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource definition.
+ * @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 the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualnetworksInner createOrUpdate(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksInner virtualnetworks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource definition.
+ * @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 the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualnetworksInner createOrUpdate(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksInner virtualnetworks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String virtualnetworksName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String virtualnetworksName, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource patch definition.
+ * @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 the virtualnetworks resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualnetworksInner update(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksPatch virtualnetworks);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param virtualnetworksName The virtualnetworksName parameter.
+ * @param virtualnetworks The virtualnetworks resource patch definition.
+ * @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 the virtualnetworks resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String virtualnetworksName, VirtualnetworksPatch virtualnetworks, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java
deleted file mode 100644
index f3536ea73c011..0000000000000
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.azurestackhci.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.azurestackhci.models.OperationDetail;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Available operations of the service. */
-@Fluent
-public final class AvailableOperationsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableOperationsInner.class);
-
- /*
- * Collection of available operation details
- */
- @JsonProperty(value = "value")
- private List value;
-
- /*
- * URL client should use to fetch the next page (per server side paging).
- * It's null for now, added for future use.
- */
- @JsonProperty(value = "nextLink")
- private String nextLink;
-
- /**
- * Get the value property: Collection of available operation details.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Set the value property: Collection of available operation details.
- *
- * @param value the value value to set.
- * @return the AvailableOperationsInner object itself.
- */
- public AvailableOperationsInner withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @param nextLink the nextLink value to set.
- * @return the AvailableOperationsInner object itself.
- */
- public AvailableOperationsInner withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java
deleted file mode 100644
index 30f5fcebff66e..0000000000000
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java
+++ /dev/null
@@ -1,404 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.azurestackhci.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
-import com.azure.resourcemanager.azurestackhci.models.CreatedByType;
-import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
-import com.azure.resourcemanager.azurestackhci.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-import java.util.Map;
-
-/** Cluster details. */
-@JsonFlatten
-@Fluent
-public class ClusterInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
-
- /*
- * Provisioning state.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * Status of the cluster agent.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private Status status;
-
- /*
- * Unique, immutable resource id.
- */
- @JsonProperty(value = "properties.cloudId", access = JsonProperty.Access.WRITE_ONLY)
- private String cloudId;
-
- /*
- * App id of cluster AAD identity.
- */
- @JsonProperty(value = "properties.aadClientId")
- private String aadClientId;
-
- /*
- * Tenant id of cluster AAD identity.
- */
- @JsonProperty(value = "properties.aadTenantId")
- private String aadTenantId;
-
- /*
- * Properties reported by cluster agent.
- */
- @JsonProperty(value = "properties.reportedProperties")
- private ClusterReportedProperties reportedProperties;
-
- /*
- * Number of days remaining in the trial period.
- */
- @JsonProperty(value = "properties.trialDaysRemaining", access = JsonProperty.Access.WRITE_ONLY)
- private Float trialDaysRemaining;
-
- /*
- * Type of billing applied to the resource.
- */
- @JsonProperty(value = "properties.billingModel", access = JsonProperty.Access.WRITE_ONLY)
- private String billingModel;
-
- /*
- * First cluster sync timestamp.
- */
- @JsonProperty(value = "properties.registrationTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime registrationTimestamp;
-
- /*
- * Most recent cluster sync timestamp.
- */
- @JsonProperty(value = "properties.lastSyncTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastSyncTimestamp;
-
- /*
- * Most recent billing meter timestamp.
- */
- @JsonProperty(value = "properties.lastBillingTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastBillingTimestamp;
-
- /*
- * The identity that created the resource.
- */
- @JsonProperty(value = "systemData.createdBy")
- private String createdBy;
-
- /*
- * The type of identity that created the resource.
- */
- @JsonProperty(value = "systemData.createdByType")
- private CreatedByType createdByType;
-
- /*
- * The timestamp of resource creation (UTC).
- */
- @JsonProperty(value = "systemData.createdAt")
- private OffsetDateTime createdAt;
-
- /*
- * The identity that last modified the resource.
- */
- @JsonProperty(value = "systemData.lastModifiedBy")
- private String lastModifiedBy;
-
- /*
- * The type of identity that last modified the resource.
- */
- @JsonProperty(value = "systemData.lastModifiedByType")
- private CreatedByType lastModifiedByType;
-
- /*
- * The timestamp of resource last modification (UTC)
- */
- @JsonProperty(value = "systemData.lastModifiedAt")
- private OffsetDateTime lastModifiedAt;
-
- /**
- * Get the provisioningState property: Provisioning state.
- *
- * @return the provisioningState value.
- */
- public ProvisioningState provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Get the status property: Status of the cluster agent.
- *
- * @return the status value.
- */
- public Status status() {
- return this.status;
- }
-
- /**
- * Get the cloudId property: Unique, immutable resource id.
- *
- * @return the cloudId value.
- */
- public String cloudId() {
- return this.cloudId;
- }
-
- /**
- * Get the aadClientId property: App id of cluster AAD identity.
- *
- * @return the aadClientId value.
- */
- public String aadClientId() {
- return this.aadClientId;
- }
-
- /**
- * Set the aadClientId property: App id of cluster AAD identity.
- *
- * @param aadClientId the aadClientId value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withAadClientId(String aadClientId) {
- this.aadClientId = aadClientId;
- return this;
- }
-
- /**
- * Get the aadTenantId property: Tenant id of cluster AAD identity.
- *
- * @return the aadTenantId value.
- */
- public String aadTenantId() {
- return this.aadTenantId;
- }
-
- /**
- * Set the aadTenantId property: Tenant id of cluster AAD identity.
- *
- * @param aadTenantId the aadTenantId value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withAadTenantId(String aadTenantId) {
- this.aadTenantId = aadTenantId;
- return this;
- }
-
- /**
- * Get the reportedProperties property: Properties reported by cluster agent.
- *
- * @return the reportedProperties value.
- */
- public ClusterReportedProperties reportedProperties() {
- return this.reportedProperties;
- }
-
- /**
- * Set the reportedProperties property: Properties reported by cluster agent.
- *
- * @param reportedProperties the reportedProperties value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withReportedProperties(ClusterReportedProperties reportedProperties) {
- this.reportedProperties = reportedProperties;
- return this;
- }
-
- /**
- * Get the trialDaysRemaining property: Number of days remaining in the trial period.
- *
- * @return the trialDaysRemaining value.
- */
- public Float trialDaysRemaining() {
- return this.trialDaysRemaining;
- }
-
- /**
- * Get the billingModel property: Type of billing applied to the resource.
- *
- * @return the billingModel value.
- */
- public String billingModel() {
- return this.billingModel;
- }
-
- /**
- * Get the registrationTimestamp property: First cluster sync timestamp.
- *
- * @return the registrationTimestamp value.
- */
- public OffsetDateTime registrationTimestamp() {
- return this.registrationTimestamp;
- }
-
- /**
- * Get the lastSyncTimestamp property: Most recent cluster sync timestamp.
- *
- * @return the lastSyncTimestamp value.
- */
- public OffsetDateTime lastSyncTimestamp() {
- return this.lastSyncTimestamp;
- }
-
- /**
- * Get the lastBillingTimestamp property: Most recent billing meter timestamp.
- *
- * @return the lastBillingTimestamp value.
- */
- public OffsetDateTime lastBillingTimestamp() {
- return this.lastBillingTimestamp;
- }
-
- /**
- * Get the createdBy property: The identity that created the resource.
- *
- * @return the createdBy value.
- */
- public String createdBy() {
- return this.createdBy;
- }
-
- /**
- * Set the createdBy property: The identity that created the resource.
- *
- * @param createdBy the createdBy value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- return this;
- }
-
- /**
- * Get the createdByType property: The type of identity that created the resource.
- *
- * @return the createdByType value.
- */
- public CreatedByType createdByType() {
- return this.createdByType;
- }
-
- /**
- * Set the createdByType property: The type of identity that created the resource.
- *
- * @param createdByType the createdByType value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedByType(CreatedByType createdByType) {
- this.createdByType = createdByType;
- return this;
- }
-
- /**
- * Get the createdAt property: The timestamp of resource creation (UTC).
- *
- * @return the createdAt value.
- */
- public OffsetDateTime createdAt() {
- return this.createdAt;
- }
-
- /**
- * Set the createdAt property: The timestamp of resource creation (UTC).
- *
- * @param createdAt the createdAt value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
-
- /**
- * Get the lastModifiedBy property: The identity that last modified the resource.
- *
- * @return the lastModifiedBy value.
- */
- public String lastModifiedBy() {
- return this.lastModifiedBy;
- }
-
- /**
- * Set the lastModifiedBy property: The identity that last modified the resource.
- *
- * @param lastModifiedBy the lastModifiedBy value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedBy(String lastModifiedBy) {
- this.lastModifiedBy = lastModifiedBy;
- return this;
- }
-
- /**
- * Get the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @return the lastModifiedByType value.
- */
- public CreatedByType lastModifiedByType() {
- return this.lastModifiedByType;
- }
-
- /**
- * Set the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @param lastModifiedByType the lastModifiedByType value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedByType(CreatedByType lastModifiedByType) {
- this.lastModifiedByType = lastModifiedByType;
- return this;
- }
-
- /**
- * Get the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @return the lastModifiedAt value.
- */
- public OffsetDateTime lastModifiedAt() {
- return this.lastModifiedAt;
- }
-
- /**
- * Set the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @param lastModifiedAt the lastModifiedAt value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedAt(OffsetDateTime lastModifiedAt) {
- this.lastModifiedAt = lastModifiedAt;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (reportedProperties() != null) {
- reportedProperties().validate();
- }
- }
-}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties.java
new file mode 100644
index 0000000000000..f018b043caeca
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksPropertiesSubnetsPropertiesItemsItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** RouteTablePropertiesFormat route Table resource. */
+@Fluent
+public final
+class ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties {
+ /*
+ * Routes - Collection of routes contained within a route table.
+ */
+ @JsonProperty(value = "routes")
+ private List routes;
+
+ /**
+ * Get the routes property: Routes - Collection of routes contained within a route table.
+ *
+ * @return the routes value.
+ */
+ public List routes() {
+ return this.routes;
+ }
+
+ /**
+ * Set the routes property: Routes - Collection of routes contained within a route table.
+ *
+ * @param routes the routes value to set.
+ * @return the ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties
+ * object itself.
+ */
+ public ComponentsOycd2YSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetableProperties
+ withRoutes(List routes) {
+ this.routes = routes;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (routes() != null) {
+ routes().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesInner.java
new file mode 100644
index 0000000000000..90af6ec52e370
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesInner.java
@@ -0,0 +1,225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.MocGalleryImageStatus;
+import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The galleryimages resource definition. */
+@Fluent
+public final class GalleryimagesInner extends Resource {
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private GalleryimagesProperties innerProperties;
+
+ /*
+ * The extendedLocation of the resource.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private GalleryimagesExtendedLocation extendedLocation;
+
+ /**
+ * Get the innerProperties property: The properties property.
+ *
+ * @return the innerProperties value.
+ */
+ private GalleryimagesProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @return the extendedLocation value.
+ */
+ public GalleryimagesExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withExtendedLocation(GalleryimagesExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public GalleryimagesInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public GalleryimagesInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the containerName property: Container Name for storage container.
+ *
+ * @return the containerName value.
+ */
+ public String containerName() {
+ return this.innerProperties() == null ? null : this.innerProperties().containerName();
+ }
+
+ /**
+ * Set the containerName property: Container Name for storage container.
+ *
+ * @param containerName the containerName value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withContainerName(String containerName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withContainerName(containerName);
+ return this;
+ }
+
+ /**
+ * Get the imagePath property: location of the image the gallery image should be created from.
+ *
+ * @return the imagePath value.
+ */
+ public String imagePath() {
+ return this.innerProperties() == null ? null : this.innerProperties().imagePath();
+ }
+
+ /**
+ * Set the imagePath property: location of the image the gallery image should be created from.
+ *
+ * @param imagePath the imagePath value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withImagePath(String imagePath) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withImagePath(imagePath);
+ return this;
+ }
+
+ /**
+ * Get the osType property: operating system type that the gallery image uses. Expected to be linux or windows.
+ *
+ * @return the osType value.
+ */
+ public OperatingSystemTypes osType() {
+ return this.innerProperties() == null ? null : this.innerProperties().osType();
+ }
+
+ /**
+ * Set the osType property: operating system type that the gallery image uses. Expected to be linux or windows.
+ *
+ * @param osType the osType value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withOsType(OperatingSystemTypes osType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withOsType(osType);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withProvisioningState(ProvisioningStateEnum provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withResourceName(String resourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withResourceName(resourceName);
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCGalleryImageStatus defines the desired state of MOCGalleryImage.
+ *
+ * @return the status value.
+ */
+ public MocGalleryImageStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: MOCGalleryImageStatus defines the desired state of MOCGalleryImage.
+ *
+ * @param status the status value to set.
+ * @return the GalleryimagesInner object itself.
+ */
+ public GalleryimagesInner withStatus(MocGalleryImageStatus status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new GalleryimagesProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesProperties.java
new file mode 100644
index 0000000000000..05daaf2278c39
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryimagesProperties.java
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.MocGalleryImageStatus;
+import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The GalleryimagesProperties model. */
+@Fluent
+public final class GalleryimagesProperties {
+ /*
+ * Container Name for storage container
+ */
+ @JsonProperty(value = "containerName")
+ private String containerName;
+
+ /*
+ * location of the image the gallery image should be created from
+ */
+ @JsonProperty(value = "imagePath")
+ private String imagePath;
+
+ /*
+ * operating system type that the gallery image uses. Expected to be linux
+ * or windows
+ */
+ @JsonProperty(value = "osType")
+ private OperatingSystemTypes osType;
+
+ /*
+ * Provisioning state of the gallery image.
+ */
+ @JsonProperty(value = "provisioningState")
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * name of the object to be used in moc
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * MOCGalleryImageStatus defines the desired state of MOCGalleryImage
+ */
+ @JsonProperty(value = "status")
+ private MocGalleryImageStatus status;
+
+ /**
+ * Get the containerName property: Container Name for storage container.
+ *
+ * @return the containerName value.
+ */
+ public String containerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the containerName property: Container Name for storage container.
+ *
+ * @param containerName the containerName value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get the imagePath property: location of the image the gallery image should be created from.
+ *
+ * @return the imagePath value.
+ */
+ public String imagePath() {
+ return this.imagePath;
+ }
+
+ /**
+ * Set the imagePath property: location of the image the gallery image should be created from.
+ *
+ * @param imagePath the imagePath value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withImagePath(String imagePath) {
+ this.imagePath = imagePath;
+ return this;
+ }
+
+ /**
+ * Get the osType property: operating system type that the gallery image uses. Expected to be linux or windows.
+ *
+ * @return the osType value.
+ */
+ public OperatingSystemTypes osType() {
+ return this.osType;
+ }
+
+ /**
+ * Set the osType property: operating system type that the gallery image uses. Expected to be linux or windows.
+ *
+ * @param osType the osType value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withOsType(OperatingSystemTypes osType) {
+ this.osType = osType;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCGalleryImageStatus defines the desired state of MOCGalleryImage.
+ *
+ * @return the status value.
+ */
+ public MocGalleryImageStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: MOCGalleryImageStatus defines the desired state of MOCGalleryImage.
+ *
+ * @param status the status value to set.
+ * @return the GalleryimagesProperties object itself.
+ */
+ public GalleryimagesProperties withStatus(MocGalleryImageStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesInner.java
new file mode 100644
index 0000000000000..d0cf29015b767
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesInner.java
@@ -0,0 +1,244 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.InterfaceDnsSettings;
+import com.azure.resourcemanager.azurestackhci.models.IpConfiguration;
+import com.azure.resourcemanager.azurestackhci.models.MocNetworkInterfaceStatus;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The networkinterfaces resource definition. */
+@Fluent
+public final class NetworkinterfacesInner extends Resource {
+ /*
+ * MOCNetworkInterfaceSpec defines the desired state of MOCNetworkInterface
+ */
+ @JsonProperty(value = "properties")
+ private NetworkinterfacesProperties innerProperties;
+
+ /*
+ * The extendedLocation property.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private NetworkinterfacesExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: MOCNetworkInterfaceSpec defines the desired state of MOCNetworkInterface.
+ *
+ * @return the innerProperties value.
+ */
+ private NetworkinterfacesProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation property.
+ *
+ * @return the extendedLocation value.
+ */
+ public NetworkinterfacesExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation property.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withExtendedLocation(NetworkinterfacesExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NetworkinterfacesInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NetworkinterfacesInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface.
+ *
+ * @return the ipConfigurations value.
+ */
+ public List ipConfigurations() {
+ return this.innerProperties() == null ? null : this.innerProperties().ipConfigurations();
+ }
+
+ /**
+ * Set the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface.
+ *
+ * @param ipConfigurations the ipConfigurations value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withIpConfigurations(List ipConfigurations) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withIpConfigurations(ipConfigurations);
+ return this;
+ }
+
+ /**
+ * Get the macAddress property: MacAddress - The MAC address of the network interface.
+ *
+ * @return the macAddress value.
+ */
+ public String macAddress() {
+ return this.innerProperties() == null ? null : this.innerProperties().macAddress();
+ }
+
+ /**
+ * Set the macAddress property: MacAddress - The MAC address of the network interface.
+ *
+ * @param macAddress the macAddress value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withMacAddress(String macAddress) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withMacAddress(macAddress);
+ return this;
+ }
+
+ /**
+ * Get the dnsSettings property: DNS Settings for the interface.
+ *
+ * @return the dnsSettings value.
+ */
+ public InterfaceDnsSettings dnsSettings() {
+ return this.innerProperties() == null ? null : this.innerProperties().dnsSettings();
+ }
+
+ /**
+ * Set the dnsSettings property: DNS Settings for the interface.
+ *
+ * @param dnsSettings the dnsSettings value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withDnsSettings(InterfaceDnsSettings dnsSettings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withDnsSettings(dnsSettings);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withProvisioningState(ProvisioningStateEnum provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withResourceName(String resourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withResourceName(resourceName);
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface.
+ *
+ * @return the status value.
+ */
+ public MocNetworkInterfaceStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface.
+ *
+ * @param status the status value to set.
+ * @return the NetworkinterfacesInner object itself.
+ */
+ public NetworkinterfacesInner withStatus(MocNetworkInterfaceStatus status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new NetworkinterfacesProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesProperties.java
new file mode 100644
index 0000000000000..3b0df14744b1c
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkinterfacesProperties.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.InterfaceDnsSettings;
+import com.azure.resourcemanager.azurestackhci.models.IpConfiguration;
+import com.azure.resourcemanager.azurestackhci.models.MocNetworkInterfaceStatus;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** MOCNetworkInterfaceSpec defines the desired state of MOCNetworkInterface. */
+@Fluent
+public final class NetworkinterfacesProperties {
+ /*
+ * IPConfigurations - A list of IPConfigurations of the network interface.
+ */
+ @JsonProperty(value = "ipConfigurations")
+ private List ipConfigurations;
+
+ /*
+ * MacAddress - The MAC address of the network interface.
+ */
+ @JsonProperty(value = "macAddress")
+ private String macAddress;
+
+ /*
+ * DNS Settings for the interface
+ */
+ @JsonProperty(value = "dnsSettings")
+ private InterfaceDnsSettings dnsSettings;
+
+ /*
+ * Provisioning state of the gallery image.
+ */
+ @JsonProperty(value = "provisioningState")
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * name of the object to be used in moc
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * MOCNetworkInterfaceStatus defines the desired state of
+ * MOCNetworkInterface
+ */
+ @JsonProperty(value = "status")
+ private MocNetworkInterfaceStatus status;
+
+ /**
+ * Get the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface.
+ *
+ * @return the ipConfigurations value.
+ */
+ public List ipConfigurations() {
+ return this.ipConfigurations;
+ }
+
+ /**
+ * Set the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface.
+ *
+ * @param ipConfigurations the ipConfigurations value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withIpConfigurations(List ipConfigurations) {
+ this.ipConfigurations = ipConfigurations;
+ return this;
+ }
+
+ /**
+ * Get the macAddress property: MacAddress - The MAC address of the network interface.
+ *
+ * @return the macAddress value.
+ */
+ public String macAddress() {
+ return this.macAddress;
+ }
+
+ /**
+ * Set the macAddress property: MacAddress - The MAC address of the network interface.
+ *
+ * @param macAddress the macAddress value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withMacAddress(String macAddress) {
+ this.macAddress = macAddress;
+ return this;
+ }
+
+ /**
+ * Get the dnsSettings property: DNS Settings for the interface.
+ *
+ * @return the dnsSettings value.
+ */
+ public InterfaceDnsSettings dnsSettings() {
+ return this.dnsSettings;
+ }
+
+ /**
+ * Set the dnsSettings property: DNS Settings for the interface.
+ *
+ * @param dnsSettings the dnsSettings value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withDnsSettings(InterfaceDnsSettings dnsSettings) {
+ this.dnsSettings = dnsSettings;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface.
+ *
+ * @return the status value.
+ */
+ public MocNetworkInterfaceStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: MOCNetworkInterfaceStatus defines the desired state of MOCNetworkInterface.
+ *
+ * @param status the status value to set.
+ * @return the NetworkinterfacesProperties object itself.
+ */
+ public NetworkinterfacesProperties withStatus(MocNetworkInterfaceStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (ipConfigurations() != null) {
+ ipConfigurations().forEach(e -> e.validate());
+ }
+ if (dnsSettings() != null) {
+ dnsSettings().validate();
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java
new file mode 100644
index 0000000000000..cd70af853a48e
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.azurestackhci.models.Operation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
+ */
+@Immutable
+public final class OperationListResultInner {
+ /*
+ * List of operations supported by the resource provider
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * URL to get the next set of operation list results (if there are any).
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: List of operations supported by the resource provider.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of operation list results (if there are any).
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksInner.java
new file mode 100644
index 0000000000000..a73e8ae04fd0a
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksInner.java
@@ -0,0 +1,287 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualHardDiskStatus;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualharddisksExtendedLocation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The virtualharddisks resource definition. */
+@Fluent
+public final class VirtualharddisksInner extends Resource {
+ /*
+ * MOCVirtualHardDiskSpec defines the desired state of MOCVirtualHardDisk
+ */
+ @JsonProperty(value = "properties")
+ private VirtualharddisksProperties innerProperties;
+
+ /*
+ * The extendedLocation property.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private VirtualharddisksExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: MOCVirtualHardDiskSpec defines the desired state of MOCVirtualHardDisk.
+ *
+ * @return the innerProperties value.
+ */
+ private VirtualharddisksProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation property.
+ *
+ * @return the extendedLocation value.
+ */
+ public VirtualharddisksExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation property.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withExtendedLocation(VirtualharddisksExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualharddisksInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualharddisksInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the blockSizeBytes property: The blockSizeBytes property.
+ *
+ * @return the blockSizeBytes value.
+ */
+ public Integer blockSizeBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().blockSizeBytes();
+ }
+
+ /**
+ * Set the blockSizeBytes property: The blockSizeBytes property.
+ *
+ * @param blockSizeBytes the blockSizeBytes value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withBlockSizeBytes(Integer blockSizeBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withBlockSizeBytes(blockSizeBytes);
+ return this;
+ }
+
+ /**
+ * Get the diskSizeBytes property: diskSizeBytes - size of the disk in GB.
+ *
+ * @return the diskSizeBytes value.
+ */
+ public Long diskSizeBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().diskSizeBytes();
+ }
+
+ /**
+ * Set the diskSizeBytes property: diskSizeBytes - size of the disk in GB.
+ *
+ * @param diskSizeBytes the diskSizeBytes value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withDiskSizeBytes(Long diskSizeBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withDiskSizeBytes(diskSizeBytes);
+ return this;
+ }
+
+ /**
+ * Get the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk.
+ *
+ * @return the dynamic value.
+ */
+ public Boolean dynamic() {
+ return this.innerProperties() == null ? null : this.innerProperties().dynamic();
+ }
+
+ /**
+ * Set the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk.
+ *
+ * @param dynamic the dynamic value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withDynamic(Boolean dynamic) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withDynamic(dynamic);
+ return this;
+ }
+
+ /**
+ * Get the logicalSectorBytes property: The logicalSectorBytes property.
+ *
+ * @return the logicalSectorBytes value.
+ */
+ public Integer logicalSectorBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().logicalSectorBytes();
+ }
+
+ /**
+ * Set the logicalSectorBytes property: The logicalSectorBytes property.
+ *
+ * @param logicalSectorBytes the logicalSectorBytes value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withLogicalSectorBytes(Integer logicalSectorBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withLogicalSectorBytes(logicalSectorBytes);
+ return this;
+ }
+
+ /**
+ * Get the physicalSectorBytes property: The physicalSectorBytes property.
+ *
+ * @return the physicalSectorBytes value.
+ */
+ public Integer physicalSectorBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().physicalSectorBytes();
+ }
+
+ /**
+ * Set the physicalSectorBytes property: The physicalSectorBytes property.
+ *
+ * @param physicalSectorBytes the physicalSectorBytes value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withPhysicalSectorBytes(Integer physicalSectorBytes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withPhysicalSectorBytes(physicalSectorBytes);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withProvisioningState(ProvisioningStateEnum provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withResourceName(String resourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withResourceName(resourceName);
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk.
+ *
+ * @return the status value.
+ */
+ public MocVirtualHardDiskStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk.
+ *
+ * @param status the status value to set.
+ * @return the VirtualharddisksInner object itself.
+ */
+ public VirtualharddisksInner withStatus(MocVirtualHardDiskStatus status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualharddisksProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksProperties.java
new file mode 100644
index 0000000000000..b19bb7fa11aaf
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualharddisksProperties.java
@@ -0,0 +1,233 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualHardDiskStatus;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** MOCVirtualHardDiskSpec defines the desired state of MOCVirtualHardDisk. */
+@Fluent
+public final class VirtualharddisksProperties {
+ /*
+ * The blockSizeBytes property.
+ */
+ @JsonProperty(value = "blockSizeBytes")
+ private Integer blockSizeBytes;
+
+ /*
+ * diskSizeBytes - size of the disk in GB
+ */
+ @JsonProperty(value = "diskSizeBytes")
+ private Long diskSizeBytes;
+
+ /*
+ * Boolean for enabling dynamic sizing on the virtual hard disk
+ */
+ @JsonProperty(value = "dynamic")
+ private Boolean dynamic;
+
+ /*
+ * The logicalSectorBytes property.
+ */
+ @JsonProperty(value = "logicalSectorBytes")
+ private Integer logicalSectorBytes;
+
+ /*
+ * The physicalSectorBytes property.
+ */
+ @JsonProperty(value = "physicalSectorBytes")
+ private Integer physicalSectorBytes;
+
+ /*
+ * Provisioning state of the gallery image.
+ */
+ @JsonProperty(value = "provisioningState")
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * name of the object to be used in moc
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk
+ */
+ @JsonProperty(value = "status")
+ private MocVirtualHardDiskStatus status;
+
+ /**
+ * Get the blockSizeBytes property: The blockSizeBytes property.
+ *
+ * @return the blockSizeBytes value.
+ */
+ public Integer blockSizeBytes() {
+ return this.blockSizeBytes;
+ }
+
+ /**
+ * Set the blockSizeBytes property: The blockSizeBytes property.
+ *
+ * @param blockSizeBytes the blockSizeBytes value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withBlockSizeBytes(Integer blockSizeBytes) {
+ this.blockSizeBytes = blockSizeBytes;
+ return this;
+ }
+
+ /**
+ * Get the diskSizeBytes property: diskSizeBytes - size of the disk in GB.
+ *
+ * @return the diskSizeBytes value.
+ */
+ public Long diskSizeBytes() {
+ return this.diskSizeBytes;
+ }
+
+ /**
+ * Set the diskSizeBytes property: diskSizeBytes - size of the disk in GB.
+ *
+ * @param diskSizeBytes the diskSizeBytes value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withDiskSizeBytes(Long diskSizeBytes) {
+ this.diskSizeBytes = diskSizeBytes;
+ return this;
+ }
+
+ /**
+ * Get the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk.
+ *
+ * @return the dynamic value.
+ */
+ public Boolean dynamic() {
+ return this.dynamic;
+ }
+
+ /**
+ * Set the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk.
+ *
+ * @param dynamic the dynamic value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withDynamic(Boolean dynamic) {
+ this.dynamic = dynamic;
+ return this;
+ }
+
+ /**
+ * Get the logicalSectorBytes property: The logicalSectorBytes property.
+ *
+ * @return the logicalSectorBytes value.
+ */
+ public Integer logicalSectorBytes() {
+ return this.logicalSectorBytes;
+ }
+
+ /**
+ * Set the logicalSectorBytes property: The logicalSectorBytes property.
+ *
+ * @param logicalSectorBytes the logicalSectorBytes value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withLogicalSectorBytes(Integer logicalSectorBytes) {
+ this.logicalSectorBytes = logicalSectorBytes;
+ return this;
+ }
+
+ /**
+ * Get the physicalSectorBytes property: The physicalSectorBytes property.
+ *
+ * @return the physicalSectorBytes value.
+ */
+ public Integer physicalSectorBytes() {
+ return this.physicalSectorBytes;
+ }
+
+ /**
+ * Set the physicalSectorBytes property: The physicalSectorBytes property.
+ *
+ * @param physicalSectorBytes the physicalSectorBytes value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withPhysicalSectorBytes(Integer physicalSectorBytes) {
+ this.physicalSectorBytes = physicalSectorBytes;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk.
+ *
+ * @return the status value.
+ */
+ public MocVirtualHardDiskStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: MOCVirtualHardDiskStatus defines the desired state of MocVirtualHardDisk.
+ *
+ * @param status the status value to set.
+ * @return the VirtualharddisksProperties object itself.
+ */
+ public VirtualharddisksProperties withStatus(MocVirtualHardDiskStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesInner.java
new file mode 100644
index 0000000000000..5cb19c61b9118
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesInner.java
@@ -0,0 +1,294 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualMachineStatus;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesHardwareProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesNetworkProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesOsProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesSecurityProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesStorageProfile;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The virtualmachines resource definition. */
+@Fluent
+public final class VirtualmachinesInner extends Resource {
+ /*
+ * MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine
+ */
+ @JsonProperty(value = "properties")
+ private VirtualmachinesProperties innerProperties;
+
+ /*
+ * The extendedLocation property.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private VirtualmachinesExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine.
+ *
+ * @return the innerProperties value.
+ */
+ private VirtualmachinesProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation property.
+ *
+ * @return the extendedLocation value.
+ */
+ public VirtualmachinesExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation property.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withExtendedLocation(VirtualmachinesExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualmachinesInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualmachinesInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine.
+ *
+ * @return the hardwareProfile value.
+ */
+ public VirtualmachinesPropertiesHardwareProfile hardwareProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().hardwareProfile();
+ }
+
+ /**
+ * Set the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine.
+ *
+ * @param hardwareProfile the hardwareProfile value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withHardwareProfile(VirtualmachinesPropertiesHardwareProfile hardwareProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withHardwareProfile(hardwareProfile);
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: NetworkProfile - describes the network configuration the virtual machine.
+ *
+ * @return the networkProfile value.
+ */
+ public VirtualmachinesPropertiesNetworkProfile networkProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().networkProfile();
+ }
+
+ /**
+ * Set the networkProfile property: NetworkProfile - describes the network configuration the virtual machine.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withNetworkProfile(VirtualmachinesPropertiesNetworkProfile networkProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withNetworkProfile(networkProfile);
+ return this;
+ }
+
+ /**
+ * Get the osProfile property: OsProfile - describes the configuration of the operating system and sets login data.
+ *
+ * @return the osProfile value.
+ */
+ public VirtualmachinesPropertiesOsProfile osProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().osProfile();
+ }
+
+ /**
+ * Set the osProfile property: OsProfile - describes the configuration of the operating system and sets login data.
+ *
+ * @param osProfile the osProfile value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withOsProfile(VirtualmachinesPropertiesOsProfile osProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withOsProfile(osProfile);
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withResourceName(String resourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withResourceName(resourceName);
+ return this;
+ }
+
+ /**
+ * Get the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine.
+ *
+ * @return the securityProfile value.
+ */
+ public VirtualmachinesPropertiesSecurityProfile securityProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().securityProfile();
+ }
+
+ /**
+ * Set the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine.
+ *
+ * @param securityProfile the securityProfile value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withSecurityProfile(VirtualmachinesPropertiesSecurityProfile securityProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withSecurityProfile(securityProfile);
+ return this;
+ }
+
+ /**
+ * Get the storageProfile property: StorageProfile - contains information about the disks and storage information
+ * for the virtual machine.
+ *
+ * @return the storageProfile value.
+ */
+ public VirtualmachinesPropertiesStorageProfile storageProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().storageProfile();
+ }
+
+ /**
+ * Set the storageProfile property: StorageProfile - contains information about the disks and storage information
+ * for the virtual machine.
+ *
+ * @param storageProfile the storageProfile value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withStorageProfile(VirtualmachinesPropertiesStorageProfile storageProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withStorageProfile(storageProfile);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withProvisioningState(ProvisioningStateEnum provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine.
+ *
+ * @return the status value.
+ */
+ public MocVirtualMachineStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine.
+ *
+ * @param status the status value to set.
+ * @return the VirtualmachinesInner object itself.
+ */
+ public VirtualmachinesInner withStatus(MocVirtualMachineStatus status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualmachinesProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesProperties.java
new file mode 100644
index 0000000000000..22270a4388ff7
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualmachinesProperties.java
@@ -0,0 +1,259 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualMachineStatus;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesHardwareProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesNetworkProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesOsProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesSecurityProfile;
+import com.azure.resourcemanager.azurestackhci.models.VirtualmachinesPropertiesStorageProfile;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine. */
+@Fluent
+public final class VirtualmachinesProperties {
+ /*
+ * HardwareProfile - Specifies the hardware settings for the virtual
+ * machine.
+ */
+ @JsonProperty(value = "hardwareProfile")
+ private VirtualmachinesPropertiesHardwareProfile hardwareProfile;
+
+ /*
+ * NetworkProfile - describes the network configuration the virtual machine
+ */
+ @JsonProperty(value = "networkProfile")
+ private VirtualmachinesPropertiesNetworkProfile networkProfile;
+
+ /*
+ * OsProfile - describes the configuration of the operating system and sets
+ * login data
+ */
+ @JsonProperty(value = "osProfile")
+ private VirtualmachinesPropertiesOsProfile osProfile;
+
+ /*
+ * name of the object to be used in moc
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * SecurityProfile - Specifies the security settings for the virtual
+ * machine.
+ */
+ @JsonProperty(value = "securityProfile")
+ private VirtualmachinesPropertiesSecurityProfile securityProfile;
+
+ /*
+ * StorageProfile - contains information about the disks and storage
+ * information for the virtual machine
+ */
+ @JsonProperty(value = "storageProfile")
+ private VirtualmachinesPropertiesStorageProfile storageProfile;
+
+ /*
+ * Provisioning state of the gallery image.
+ */
+ @JsonProperty(value = "provisioningState")
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine
+ */
+ @JsonProperty(value = "status")
+ private MocVirtualMachineStatus status;
+
+ /**
+ * Get the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine.
+ *
+ * @return the hardwareProfile value.
+ */
+ public VirtualmachinesPropertiesHardwareProfile hardwareProfile() {
+ return this.hardwareProfile;
+ }
+
+ /**
+ * Set the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine.
+ *
+ * @param hardwareProfile the hardwareProfile value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withHardwareProfile(VirtualmachinesPropertiesHardwareProfile hardwareProfile) {
+ this.hardwareProfile = hardwareProfile;
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: NetworkProfile - describes the network configuration the virtual machine.
+ *
+ * @return the networkProfile value.
+ */
+ public VirtualmachinesPropertiesNetworkProfile networkProfile() {
+ return this.networkProfile;
+ }
+
+ /**
+ * Set the networkProfile property: NetworkProfile - describes the network configuration the virtual machine.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withNetworkProfile(VirtualmachinesPropertiesNetworkProfile networkProfile) {
+ this.networkProfile = networkProfile;
+ return this;
+ }
+
+ /**
+ * Get the osProfile property: OsProfile - describes the configuration of the operating system and sets login data.
+ *
+ * @return the osProfile value.
+ */
+ public VirtualmachinesPropertiesOsProfile osProfile() {
+ return this.osProfile;
+ }
+
+ /**
+ * Set the osProfile property: OsProfile - describes the configuration of the operating system and sets login data.
+ *
+ * @param osProfile the osProfile value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withOsProfile(VirtualmachinesPropertiesOsProfile osProfile) {
+ this.osProfile = osProfile;
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine.
+ *
+ * @return the securityProfile value.
+ */
+ public VirtualmachinesPropertiesSecurityProfile securityProfile() {
+ return this.securityProfile;
+ }
+
+ /**
+ * Set the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine.
+ *
+ * @param securityProfile the securityProfile value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withSecurityProfile(VirtualmachinesPropertiesSecurityProfile securityProfile) {
+ this.securityProfile = securityProfile;
+ return this;
+ }
+
+ /**
+ * Get the storageProfile property: StorageProfile - contains information about the disks and storage information
+ * for the virtual machine.
+ *
+ * @return the storageProfile value.
+ */
+ public VirtualmachinesPropertiesStorageProfile storageProfile() {
+ return this.storageProfile;
+ }
+
+ /**
+ * Set the storageProfile property: StorageProfile - contains information about the disks and storage information
+ * for the virtual machine.
+ *
+ * @param storageProfile the storageProfile value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withStorageProfile(VirtualmachinesPropertiesStorageProfile storageProfile) {
+ this.storageProfile = storageProfile;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine.
+ *
+ * @return the status value.
+ */
+ public MocVirtualMachineStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: MOCVirtualMachineSpec defines the desired state of MOCVirtualMachine.
+ *
+ * @param status the status value to set.
+ * @return the VirtualmachinesProperties object itself.
+ */
+ public VirtualmachinesProperties withStatus(MocVirtualMachineStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (hardwareProfile() != null) {
+ hardwareProfile().validate();
+ }
+ if (networkProfile() != null) {
+ networkProfile().validate();
+ }
+ if (osProfile() != null) {
+ osProfile().validate();
+ }
+ if (securityProfile() != null) {
+ securityProfile().validate();
+ }
+ if (storageProfile() != null) {
+ storageProfile().validate();
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksInner.java
new file mode 100644
index 0000000000000..fd7bf6d60ea4f
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksInner.java
@@ -0,0 +1,221 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualNetworkStatus;
+import com.azure.resourcemanager.azurestackhci.models.NetworkTypeEnum;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksPropertiesSubnetsItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The virtualnetworks resource definition. */
+@Fluent
+public final class VirtualnetworksInner extends Resource {
+ /*
+ * MOCVirtualNetworkSpec defines the desired state of MOCVirtualNetwork
+ */
+ @JsonProperty(value = "properties")
+ private VirtualnetworksProperties innerProperties;
+
+ /*
+ * The extendedLocation property.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private VirtualnetworksExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: MOCVirtualNetworkSpec defines the desired state of MOCVirtualNetwork.
+ *
+ * @return the innerProperties value.
+ */
+ private VirtualnetworksProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation property.
+ *
+ * @return the extendedLocation value.
+ */
+ public VirtualnetworksExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation property.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withExtendedLocation(VirtualnetworksExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualnetworksInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public VirtualnetworksInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the networkType property: Type of the network.
+ *
+ * @return the networkType value.
+ */
+ public NetworkTypeEnum networkType() {
+ return this.innerProperties() == null ? null : this.innerProperties().networkType();
+ }
+
+ /**
+ * Set the networkType property: Type of the network.
+ *
+ * @param networkType the networkType value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withNetworkType(NetworkTypeEnum networkType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualnetworksProperties();
+ }
+ this.innerProperties().withNetworkType(networkType);
+ return this;
+ }
+
+ /**
+ * Get the subnets property: Subnet - list of subnets under the virtual network.
+ *
+ * @return the subnets value.
+ */
+ public List subnets() {
+ return this.innerProperties() == null ? null : this.innerProperties().subnets();
+ }
+
+ /**
+ * Set the subnets property: Subnet - list of subnets under the virtual network.
+ *
+ * @param subnets the subnets value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withSubnets(List subnets) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualnetworksProperties();
+ }
+ this.innerProperties().withSubnets(subnets);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withProvisioningState(ProvisioningStateEnum provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualnetworksProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withResourceName(String resourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualnetworksProperties();
+ }
+ this.innerProperties().withResourceName(resourceName);
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork.
+ *
+ * @return the status value.
+ */
+ public MocVirtualNetworkStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork.
+ *
+ * @param status the status value to set.
+ * @return the VirtualnetworksInner object itself.
+ */
+ public VirtualnetworksInner withStatus(MocVirtualNetworkStatus status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualnetworksProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksProperties.java
new file mode 100644
index 0000000000000..1fcae397ffb7f
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksProperties.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.MocVirtualNetworkStatus;
+import com.azure.resourcemanager.azurestackhci.models.NetworkTypeEnum;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.azurestackhci.models.VirtualnetworksPropertiesSubnetsItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** MOCVirtualNetworkSpec defines the desired state of MOCVirtualNetwork. */
+@Fluent
+public final class VirtualnetworksProperties {
+ /*
+ * Type of the network
+ */
+ @JsonProperty(value = "networkType")
+ private NetworkTypeEnum networkType;
+
+ /*
+ * Subnet - list of subnets under the virtual network
+ */
+ @JsonProperty(value = "subnets")
+ private List subnets;
+
+ /*
+ * Provisioning state of the gallery image.
+ */
+ @JsonProperty(value = "provisioningState")
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * name of the object to be used in moc
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork
+ */
+ @JsonProperty(value = "status")
+ private MocVirtualNetworkStatus status;
+
+ /**
+ * Get the networkType property: Type of the network.
+ *
+ * @return the networkType value.
+ */
+ public NetworkTypeEnum networkType() {
+ return this.networkType;
+ }
+
+ /**
+ * Set the networkType property: Type of the network.
+ *
+ * @param networkType the networkType value to set.
+ * @return the VirtualnetworksProperties object itself.
+ */
+ public VirtualnetworksProperties withNetworkType(NetworkTypeEnum networkType) {
+ this.networkType = networkType;
+ return this;
+ }
+
+ /**
+ * Get the subnets property: Subnet - list of subnets under the virtual network.
+ *
+ * @return the subnets value.
+ */
+ public List subnets() {
+ return this.subnets;
+ }
+
+ /**
+ * Set the subnets property: Subnet - list of subnets under the virtual network.
+ *
+ * @param subnets the subnets value to set.
+ * @return the VirtualnetworksProperties object itself.
+ */
+ public VirtualnetworksProperties withSubnets(List subnets) {
+ this.subnets = subnets;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: Provisioning state of the gallery image.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the VirtualnetworksProperties object itself.
+ */
+ public VirtualnetworksProperties withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the resourceName property: name of the object to be used in moc.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: name of the object to be used in moc.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the VirtualnetworksProperties object itself.
+ */
+ public VirtualnetworksProperties withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the status property: MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork.
+ *
+ * @return the status value.
+ */
+ public MocVirtualNetworkStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: MOCVirtualNetworkStatus defines the desired state of MOCVirtualNetwork.
+ *
+ * @param status the status value to set.
+ * @return the VirtualnetworksProperties object itself.
+ */
+ public VirtualnetworksProperties withStatus(MocVirtualNetworkStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (subnets() != null) {
+ subnets().forEach(e -> e.validate());
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemAutoGenerated.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemAutoGenerated.java
new file mode 100644
index 0000000000000..c5b498c185f62
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemAutoGenerated.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable;
+import com.azure.resourcemanager.azurestackhci.models.ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems;
+import com.azure.resourcemanager.azurestackhci.models.IpAllocationMethodEnum;
+import com.azure.resourcemanager.azurestackhci.models.IpPool;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** SubnetProperties - Properties of the subnet. */
+@Fluent
+public final class VirtualnetworksPropertiesSubnetsItemAutoGenerated {
+ /*
+ * Cidr for this subnet - IPv4, IPv6
+ */
+ @JsonProperty(value = "addressPrefix")
+ private String addressPrefix;
+
+ /*
+ * AddressPrefixes - List of address prefixes for the subnet.
+ */
+ @JsonProperty(value = "addressPrefixes")
+ private List addressPrefixes;
+
+ /*
+ * IPAllocationMethod - The IP address allocation method. Possible values
+ * include: 'Static', 'Dynamic'
+ */
+ @JsonProperty(value = "ipAllocationMethod")
+ private IpAllocationMethodEnum ipAllocationMethod;
+
+ /*
+ * IPConfigurationReferences - list of IPConfigurationReferences
+ */
+ @JsonProperty(value = "ipConfigurationReferences")
+ private List<
+ ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems>
+ ipConfigurationReferences;
+
+ /*
+ * RouteTable for the subnet
+ */
+ @JsonProperty(value = "routeTable")
+ private ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable routeTable;
+
+ /*
+ * network associated pool of IP Addresses
+ */
+ @JsonProperty(value = "ipPools")
+ private List ipPools;
+
+ /*
+ * Vlan to use for the subnet
+ */
+ @JsonProperty(value = "vlan")
+ private Integer vlan;
+
+ /**
+ * Get the addressPrefix property: Cidr for this subnet - IPv4, IPv6.
+ *
+ * @return the addressPrefix value.
+ */
+ public String addressPrefix() {
+ return this.addressPrefix;
+ }
+
+ /**
+ * Set the addressPrefix property: Cidr for this subnet - IPv4, IPv6.
+ *
+ * @param addressPrefix the addressPrefix value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withAddressPrefix(String addressPrefix) {
+ this.addressPrefix = addressPrefix;
+ return this;
+ }
+
+ /**
+ * Get the addressPrefixes property: AddressPrefixes - List of address prefixes for the subnet.
+ *
+ * @return the addressPrefixes value.
+ */
+ public List addressPrefixes() {
+ return this.addressPrefixes;
+ }
+
+ /**
+ * Set the addressPrefixes property: AddressPrefixes - List of address prefixes for the subnet.
+ *
+ * @param addressPrefixes the addressPrefixes value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withAddressPrefixes(List addressPrefixes) {
+ this.addressPrefixes = addressPrefixes;
+ return this;
+ }
+
+ /**
+ * Get the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values
+ * include: 'Static', 'Dynamic'.
+ *
+ * @return the ipAllocationMethod value.
+ */
+ public IpAllocationMethodEnum ipAllocationMethod() {
+ return this.ipAllocationMethod;
+ }
+
+ /**
+ * Set the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values
+ * include: 'Static', 'Dynamic'.
+ *
+ * @param ipAllocationMethod the ipAllocationMethod value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withIpAllocationMethod(
+ IpAllocationMethodEnum ipAllocationMethod) {
+ this.ipAllocationMethod = ipAllocationMethod;
+ return this;
+ }
+
+ /**
+ * Get the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences.
+ *
+ * @return the ipConfigurationReferences value.
+ */
+ public List<
+ ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems>
+ ipConfigurationReferences() {
+ return this.ipConfigurationReferences;
+ }
+
+ /**
+ * Set the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences.
+ *
+ * @param ipConfigurationReferences the ipConfigurationReferences value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withIpConfigurationReferences(
+ List<
+ ComponentsVqks9HSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesIpconfigurationreferencesItems>
+ ipConfigurationReferences) {
+ this.ipConfigurationReferences = ipConfigurationReferences;
+ return this;
+ }
+
+ /**
+ * Get the routeTable property: RouteTable for the subnet.
+ *
+ * @return the routeTable value.
+ */
+ public ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable routeTable() {
+ return this.routeTable;
+ }
+
+ /**
+ * Set the routeTable property: RouteTable for the subnet.
+ *
+ * @param routeTable the routeTable value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withRouteTable(
+ ComponentsL15GkaSchemasVirtualnetworkspropertiesPropertiesSubnetsItemsPropertiesRoutetable routeTable) {
+ this.routeTable = routeTable;
+ return this;
+ }
+
+ /**
+ * Get the ipPools property: network associated pool of IP Addresses.
+ *
+ * @return the ipPools value.
+ */
+ public List ipPools() {
+ return this.ipPools;
+ }
+
+ /**
+ * Set the ipPools property: network associated pool of IP Addresses.
+ *
+ * @param ipPools the ipPools value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withIpPools(List ipPools) {
+ this.ipPools = ipPools;
+ return this;
+ }
+
+ /**
+ * Get the vlan property: Vlan to use for the subnet.
+ *
+ * @return the vlan value.
+ */
+ public Integer vlan() {
+ return this.vlan;
+ }
+
+ /**
+ * Set the vlan property: Vlan to use for the subnet.
+ *
+ * @param vlan the vlan value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemAutoGenerated object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemAutoGenerated withVlan(Integer vlan) {
+ this.vlan = vlan;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (ipConfigurationReferences() != null) {
+ ipConfigurationReferences().forEach(e -> e.validate());
+ }
+ if (routeTable() != null) {
+ routeTable().validate();
+ }
+ if (ipPools() != null) {
+ ipPools().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem.java
new file mode 100644
index 0000000000000..565b9cc4c9f11
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem.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.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** RoutePropertiesFormat - Properties of the route. */
+@Fluent
+public final class VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem {
+ /*
+ * AddressPrefix - The destination CIDR to which the route applies.
+ */
+ @JsonProperty(value = "addressPrefix")
+ private String addressPrefix;
+
+ /*
+ * NextHopIPAddress - The IP address packets should be forwarded to. Next
+ * hop values are only allowed in routes where the next hop type is
+ * VirtualAppliance.
+ */
+ @JsonProperty(value = "nextHopIpAddress")
+ private String nextHopIpAddress;
+
+ /**
+ * Get the addressPrefix property: AddressPrefix - The destination CIDR to which the route applies.
+ *
+ * @return the addressPrefix value.
+ */
+ public String addressPrefix() {
+ return this.addressPrefix;
+ }
+
+ /**
+ * Set the addressPrefix property: AddressPrefix - The destination CIDR to which the route applies.
+ *
+ * @param addressPrefix the addressPrefix value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem withAddressPrefix(String addressPrefix) {
+ this.addressPrefix = addressPrefix;
+ return this;
+ }
+
+ /**
+ * Get the nextHopIpAddress property: NextHopIPAddress - The IP address packets should be forwarded to. Next hop
+ * values are only allowed in routes where the next hop type is VirtualAppliance.
+ *
+ * @return the nextHopIpAddress value.
+ */
+ public String nextHopIpAddress() {
+ return this.nextHopIpAddress;
+ }
+
+ /**
+ * Set the nextHopIpAddress property: NextHopIPAddress - The IP address packets should be forwarded to. Next hop
+ * values are only allowed in routes where the next hop type is VirtualAppliance.
+ *
+ * @param nextHopIpAddress the nextHopIpAddress value to set.
+ * @return the VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem object itself.
+ */
+ public VirtualnetworksPropertiesSubnetsItemRouteTableRoutesItem withNextHopIpAddress(String nextHopIpAddress) {
+ this.nextHopIpAddress = nextHopIpAddress;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
index c6f8b7d73b93d..ca8e65dd56eeb 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
@@ -22,8 +22,12 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient;
-import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.GalleryimagesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.NetworkinterfacesOperationsClient;
import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.VirtualharddisksOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.VirtualmachinesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.VirtualnetworksOperationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -37,8 +41,6 @@
/** Initializes a new instance of the AzureStackHciClientImpl type. */
@ServiceClient(builder = AzureStackHciClientBuilder.class)
public final class AzureStackHciClientImpl implements AzureStackHciClient {
- private final ClientLogger logger = new ClientLogger(AzureStackHciClientImpl.class);
-
/** The ID of the target subscription. */
private final String subscriptionId;
@@ -111,28 +113,76 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The OperationsClient object to access its operations. */
- private final OperationsClient operations;
+ /** The GalleryimagesOperationsClient object to access its operations. */
+ private final GalleryimagesOperationsClient galleryimagesOperations;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the GalleryimagesOperationsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the GalleryimagesOperationsClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public GalleryimagesOperationsClient getGalleryimagesOperations() {
+ return this.galleryimagesOperations;
+ }
+
+ /** The NetworkinterfacesOperationsClient object to access its operations. */
+ private final NetworkinterfacesOperationsClient networkinterfacesOperations;
+
+ /**
+ * Gets the NetworkinterfacesOperationsClient object to access its operations.
+ *
+ * @return the NetworkinterfacesOperationsClient object.
+ */
+ public NetworkinterfacesOperationsClient getNetworkinterfacesOperations() {
+ return this.networkinterfacesOperations;
+ }
+
+ /** The VirtualharddisksOperationsClient object to access its operations. */
+ private final VirtualharddisksOperationsClient virtualharddisksOperations;
+
+ /**
+ * Gets the VirtualharddisksOperationsClient object to access its operations.
+ *
+ * @return the VirtualharddisksOperationsClient object.
+ */
+ public VirtualharddisksOperationsClient getVirtualharddisksOperations() {
+ return this.virtualharddisksOperations;
}
- /** The ClustersClient object to access its operations. */
- private final ClustersClient clusters;
+ /** The VirtualmachinesOperationsClient object to access its operations. */
+ private final VirtualmachinesOperationsClient virtualmachinesOperations;
/**
- * Gets the ClustersClient object to access its operations.
+ * Gets the VirtualmachinesOperationsClient object to access its operations.
*
- * @return the ClustersClient object.
+ * @return the VirtualmachinesOperationsClient object.
*/
- public ClustersClient getClusters() {
- return this.clusters;
+ public VirtualmachinesOperationsClient getVirtualmachinesOperations() {
+ return this.virtualmachinesOperations;
+ }
+
+ /** The VirtualnetworksOperationsClient object to access its operations. */
+ private final VirtualnetworksOperationsClient virtualnetworksOperations;
+
+ /**
+ * Gets the VirtualnetworksOperationsClient object to access its operations.
+ *
+ * @return the VirtualnetworksOperationsClient object.
+ */
+ public VirtualnetworksOperationsClient getVirtualnetworksOperations() {
+ return this.virtualnetworksOperations;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
@@ -157,9 +207,13 @@ public ClustersClient getClusters() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-10-01";
+ this.apiVersion = "2021-07-01-preview";
+ this.galleryimagesOperations = new GalleryimagesOperationsClientImpl(this);
+ this.networkinterfacesOperations = new NetworkinterfacesOperationsClientImpl(this);
+ this.virtualharddisksOperations = new VirtualharddisksOperationsClientImpl(this);
+ this.virtualmachinesOperations = new VirtualmachinesOperationsClientImpl(this);
+ this.virtualnetworksOperations = new VirtualnetworksOperationsClientImpl(this);
this.operations = new OperationsClientImpl(this);
- this.clusters = new ClustersClientImpl(this);
}
/**
@@ -245,7 +299,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -304,4 +358,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AzureStackHciClientImpl.class);
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
deleted file mode 100644
index d42ade422ccf5..0000000000000
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.azurestackhci.implementation;
-
-import com.azure.core.management.Region;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
-import com.azure.resourcemanager.azurestackhci.models.Cluster;
-import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
-import com.azure.resourcemanager.azurestackhci.models.ClusterUpdate;
-import com.azure.resourcemanager.azurestackhci.models.CreatedByType;
-import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
-import com.azure.resourcemanager.azurestackhci.models.Status;
-import java.time.OffsetDateTime;
-import java.util.Collections;
-import java.util.Map;
-
-public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
- private ClusterInner innerObject;
-
- private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public Map tags() {
- Map inner = this.innerModel().tags();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public ProvisioningState provisioningState() {
- return this.innerModel().provisioningState();
- }
-
- public Status status() {
- return this.innerModel().status();
- }
-
- public String cloudId() {
- return this.innerModel().cloudId();
- }
-
- public String aadClientId() {
- return this.innerModel().aadClientId();
- }
-
- public String aadTenantId() {
- return this.innerModel().aadTenantId();
- }
-
- public ClusterReportedProperties reportedProperties() {
- return this.innerModel().reportedProperties();
- }
-
- public Float trialDaysRemaining() {
- return this.innerModel().trialDaysRemaining();
- }
-
- public String billingModel() {
- return this.innerModel().billingModel();
- }
-
- public OffsetDateTime registrationTimestamp() {
- return this.innerModel().registrationTimestamp();
- }
-
- public OffsetDateTime lastSyncTimestamp() {
- return this.innerModel().lastSyncTimestamp();
- }
-
- public OffsetDateTime lastBillingTimestamp() {
- return this.innerModel().lastBillingTimestamp();
- }
-
- public String createdBy() {
- return this.innerModel().createdBy();
- }
-
- public CreatedByType createdByType() {
- return this.innerModel().createdByType();
- }
-
- public OffsetDateTime createdAt() {
- return this.innerModel().createdAt();
- }
-
- public String lastModifiedBy() {
- return this.innerModel().lastModifiedBy();
- }
-
- public CreatedByType lastModifiedByType() {
- return this.innerModel().lastModifiedByType();
- }
-
- public OffsetDateTime lastModifiedAt() {
- return this.innerModel().lastModifiedAt();
- }
-
- public Region region() {
- return Region.fromName(this.regionName());
- }
-
- public String regionName() {
- return this.location();
- }
-
- public ClusterInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String clusterName;
-
- private ClusterUpdate updateCluster;
-
- public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
- this.resourceGroupName = resourceGroupName;
- return this;
- }
-
- public Cluster create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .createWithResponse(resourceGroupName, clusterName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public Cluster create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .createWithResponse(resourceGroupName, clusterName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- ClusterImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
- this.innerObject = new ClusterInner();
- this.serviceManager = serviceManager;
- this.clusterName = name;
- }
-
- public ClusterImpl update() {
- this.updateCluster = new ClusterUpdate();
- return this;
- }
-
- public Cluster apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .updateWithResponse(resourceGroupName, clusterName, updateCluster, Context.NONE)
- .getValue();
- return this;
- }
-
- public Cluster apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .updateWithResponse(resourceGroupName, clusterName, updateCluster, context)
- .getValue();
- return this;
- }
-
- ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
- }
-
- public Cluster refresh() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE)
- .getValue();
- return this;
- }
-
- public Cluster refresh(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getClusters()
- .getByResourceGroupWithResponse(resourceGroupName, clusterName, context)
- .getValue();
- return this;
- }
-
- public ClusterImpl withRegion(Region location) {
- this.innerModel().withLocation(location.toString());
- return this;
- }
-
- public ClusterImpl withRegion(String location) {
- this.innerModel().withLocation(location);
- return this;
- }
-
- public ClusterImpl withTags(Map tags) {
- if (isInCreateMode()) {
- this.innerModel().withTags(tags);
- return this;
- } else {
- this.updateCluster.withTags(tags);
- return this;
- }
- }
-
- public ClusterImpl withAadClientId(String aadClientId) {
- this.innerModel().withAadClientId(aadClientId);
- return this;
- }
-
- public ClusterImpl withAadTenantId(String aadTenantId) {
- this.innerModel().withAadTenantId(aadTenantId);
- return this;
- }
-
- public ClusterImpl withReportedProperties(ClusterReportedProperties reportedProperties) {
- this.innerModel().withReportedProperties(reportedProperties);
- return this;
- }
-
- public ClusterImpl withCreatedBy(String createdBy) {
- this.innerModel().withCreatedBy(createdBy);
- return this;
- }
-
- public ClusterImpl withCreatedByType(CreatedByType createdByType) {
- this.innerModel().withCreatedByType(createdByType);
- return this;
- }
-
- public ClusterImpl withCreatedAt(OffsetDateTime createdAt) {
- this.innerModel().withCreatedAt(createdAt);
- return this;
- }
-
- public ClusterImpl withLastModifiedBy(String lastModifiedBy) {
- this.innerModel().withLastModifiedBy(lastModifiedBy);
- return this;
- }
-
- public ClusterImpl withLastModifiedByType(CreatedByType lastModifiedByType) {
- this.innerModel().withLastModifiedByType(lastModifiedByType);
- return this;
- }
-
- public ClusterImpl withLastModifiedAt(OffsetDateTime lastModifiedAt) {
- this.innerModel().withLastModifiedAt(lastModifiedAt);
- return this;
- }
-
- private boolean isInCreateMode() {
- return this.innerModel().id() == null;
- }
-}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
deleted file mode 100644
index ffdedeed7baa8..0000000000000
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.azurestackhci.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.SimpleResponse;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient;
-import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
-import com.azure.resourcemanager.azurestackhci.models.Cluster;
-import com.azure.resourcemanager.azurestackhci.models.Clusters;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public final class ClustersImpl implements Clusters {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class);
-
- private final ClustersClient innerClient;
-
- private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
-
- public ClustersImpl(
- ClustersClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
- }
-
- public Cluster getByResourceGroup(String resourceGroupName, String clusterName) {
- ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
- if (inner != null) {
- return new ClusterImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String clusterName, Context context) {
- Response inner =
- this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ClusterImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public void deleteByResourceGroup(String resourceGroupName, String clusterName) {
- this.serviceClient().delete(resourceGroupName, clusterName);
- }
-
- public Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, clusterName, context);
- }
-
- public Cluster getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
- if (clusterName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
- }
-
- public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
- if (clusterName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, context);
- }
-
- public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
- if (clusterName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
- }
- this.deleteWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
- }
-
- public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
- if (clusterName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
- }
- return this.deleteWithResponse(resourceGroupName, clusterName, context);
- }
-
- private ClustersClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
- return this.serviceManager;
- }
-
- public ClusterImpl define(String name) {
- return new ClusterImpl(name, this.manager());
- }
-}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesImpl.java
new file mode 100644
index 0000000000000..3897f30adf85b
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesImpl.java
@@ -0,0 +1,239 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryimagesInner;
+import com.azure.resourcemanager.azurestackhci.models.Galleryimages;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesPatch;
+import com.azure.resourcemanager.azurestackhci.models.MocGalleryImageStatus;
+import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import java.util.Collections;
+import java.util.Map;
+
+public final class GalleryimagesImpl implements Galleryimages, Galleryimages.Definition, Galleryimages.Update {
+ private GalleryimagesInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public GalleryimagesExtendedLocation extendedLocation() {
+ return this.innerModel().extendedLocation();
+ }
+
+ public String containerName() {
+ return this.innerModel().containerName();
+ }
+
+ public String imagePath() {
+ return this.innerModel().imagePath();
+ }
+
+ public OperatingSystemTypes osType() {
+ return this.innerModel().osType();
+ }
+
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceName() {
+ return this.innerModel().resourceName();
+ }
+
+ public MocGalleryImageStatus status() {
+ return this.innerModel().status();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public GalleryimagesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String galleryimagesName;
+
+ private GalleryimagesPatch updateGalleryimages;
+
+ public GalleryimagesImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Galleryimages create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .createOrUpdate(resourceGroupName, galleryimagesName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Galleryimages create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .createOrUpdate(resourceGroupName, galleryimagesName, this.innerModel(), context);
+ return this;
+ }
+
+ GalleryimagesImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = new GalleryimagesInner();
+ this.serviceManager = serviceManager;
+ this.galleryimagesName = name;
+ }
+
+ public GalleryimagesImpl update() {
+ this.updateGalleryimages = new GalleryimagesPatch();
+ return this;
+ }
+
+ public Galleryimages apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .updateWithResponse(resourceGroupName, galleryimagesName, updateGalleryimages, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Galleryimages apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .updateWithResponse(resourceGroupName, galleryimagesName, updateGalleryimages, context)
+ .getValue();
+ return this;
+ }
+
+ GalleryimagesImpl(
+ GalleryimagesInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.galleryimagesName = Utils.getValueFromIdByName(innerObject.id(), "galleryimages");
+ }
+
+ public Galleryimages refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .getByResourceGroupWithResponse(resourceGroupName, galleryimagesName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Galleryimages refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getGalleryimagesOperations()
+ .getByResourceGroupWithResponse(resourceGroupName, galleryimagesName, context)
+ .getValue();
+ return this;
+ }
+
+ public GalleryimagesImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public GalleryimagesImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public GalleryimagesImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateGalleryimages.withTags(tags);
+ return this;
+ }
+ }
+
+ public GalleryimagesImpl withExtendedLocation(GalleryimagesExtendedLocation extendedLocation) {
+ this.innerModel().withExtendedLocation(extendedLocation);
+ return this;
+ }
+
+ public GalleryimagesImpl withContainerName(String containerName) {
+ this.innerModel().withContainerName(containerName);
+ return this;
+ }
+
+ public GalleryimagesImpl withImagePath(String imagePath) {
+ this.innerModel().withImagePath(imagePath);
+ return this;
+ }
+
+ public GalleryimagesImpl withOsType(OperatingSystemTypes osType) {
+ this.innerModel().withOsType(osType);
+ return this;
+ }
+
+ public GalleryimagesImpl withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.innerModel().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ public GalleryimagesImpl withResourceName(String resourceName) {
+ this.innerModel().withResourceName(resourceName);
+ return this;
+ }
+
+ public GalleryimagesImpl withStatus(MocGalleryImageStatus status) {
+ this.innerModel().withStatus(status);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsClientImpl.java
new file mode 100644
index 0000000000000..4a38982ffdce4
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsClientImpl.java
@@ -0,0 +1,1364 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.GalleryimagesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryimagesInner;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesListResult;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesPatch;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in GalleryimagesOperationsClient. */
+public final class GalleryimagesOperationsClientImpl implements GalleryimagesOperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final GalleryimagesOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of GalleryimagesOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ GalleryimagesOperationsClientImpl(AzureStackHciClientImpl client) {
+ this.service =
+ RestProxy
+ .create(GalleryimagesOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientGalleryimagesOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientG")
+ private interface GalleryimagesOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/galleryimages/{galleryimagesName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("galleryimagesName") String galleryimagesName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/galleryimages/{galleryimagesName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("galleryimagesName") String galleryimagesName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") GalleryimagesInner galleryimages,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/galleryimages/{galleryimagesName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("galleryimagesName") String galleryimagesName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/galleryimages/{galleryimagesName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("galleryimagesName") String galleryimagesName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") GalleryimagesPatch galleryimages,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/galleryimages")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/galleryimages")
+ @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("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @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);
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String galleryimagesName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String galleryimagesName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, galleryimagesName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GalleryimagesInner getByResourceGroup(String resourceGroupName, String galleryimagesName) {
+ return getByResourceGroupAsync(resourceGroupName, galleryimagesName).block();
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the galleryimages resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String galleryimagesName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, galleryimagesName, context).block();
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ if (galleryimages == null) {
+ return Mono.error(new IllegalArgumentException("Parameter galleryimages is required and cannot be null."));
+ } else {
+ galleryimages.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ galleryimages,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ if (galleryimages == null) {
+ return Mono.error(new IllegalArgumentException("Parameter galleryimages is required and cannot be null."));
+ } else {
+ galleryimages.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ galleryimages,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link PollerFlux} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, GalleryimagesInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, galleryimagesName, galleryimages);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ GalleryimagesInner.class,
+ GalleryimagesInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link PollerFlux} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, GalleryimagesInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, galleryimagesName, galleryimages, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), GalleryimagesInner.class, GalleryimagesInner.class, context);
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link SyncPoller} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, GalleryimagesInner> beginCreateOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages) {
+ return beginCreateOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages).getSyncPoller();
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the {@link SyncPoller} for polling of the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, GalleryimagesInner> beginCreateOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages) {
+ return beginCreateOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GalleryimagesInner createOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages) {
+ return createOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages).block();
+ }
+
+ /**
+ * Create or update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GalleryimagesInner createOrUpdate(
+ String resourceGroupName, String galleryimagesName, GalleryimagesInner galleryimages, Context context) {
+ return createOrUpdateAsync(resourceGroupName, galleryimagesName, galleryimages, context).block();
+ }
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String galleryimagesName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String galleryimagesName) {
+ return deleteWithResponseAsync(resourceGroupName, galleryimagesName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String galleryimagesName) {
+ deleteAsync(resourceGroupName, galleryimagesName).block();
+ }
+
+ /**
+ * Delete a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String galleryimagesName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, galleryimagesName, context).block();
+ }
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ if (galleryimages == null) {
+ return Mono.error(new IllegalArgumentException("Parameter galleryimages is required and cannot be null."));
+ } else {
+ galleryimages.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ galleryimages,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (galleryimagesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter galleryimagesName is required and cannot be null."));
+ }
+ if (galleryimages == null) {
+ return Mono.error(new IllegalArgumentException("Parameter galleryimages is required and cannot be null."));
+ } else {
+ galleryimages.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ galleryimagesName,
+ this.client.getApiVersion(),
+ galleryimages,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages) {
+ return updateWithResponseAsync(resourceGroupName, galleryimagesName, galleryimages)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GalleryimagesInner update(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages) {
+ return updateAsync(resourceGroupName, galleryimagesName, galleryimages).block();
+ }
+
+ /**
+ * Update a galleryimage.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param galleryimagesName Name of the gallery image.
+ * @param galleryimages The galleryimages resource patch definition.
+ * @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 the galleryimages resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String galleryimagesName, GalleryimagesPatch galleryimages, Context context) {
+ return updateWithResponseAsync(resourceGroupName, galleryimagesName, galleryimages, context).block();
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Lists all galleryimages under the resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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()));
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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));
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List all galleryimages under the 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 list of galleryimages as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * 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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ 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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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 list of galleryimages along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsImpl.java
new file mode 100644
index 0000000000000..9a016f9cedd23
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryimagesOperationsImpl.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestackhci.fluent.GalleryimagesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryimagesInner;
+import com.azure.resourcemanager.azurestackhci.models.Galleryimages;
+import com.azure.resourcemanager.azurestackhci.models.GalleryimagesOperations;
+
+public final class GalleryimagesOperationsImpl implements GalleryimagesOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(GalleryimagesOperationsImpl.class);
+
+ private final GalleryimagesOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public GalleryimagesOperationsImpl(
+ GalleryimagesOperationsClient innerClient,
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Galleryimages getByResourceGroup(String resourceGroupName, String galleryimagesName) {
+ GalleryimagesInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, galleryimagesName);
+ if (inner != null) {
+ return new GalleryimagesImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String galleryimagesName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, galleryimagesName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new GalleryimagesImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String galleryimagesName) {
+ this.serviceClient().delete(resourceGroupName, galleryimagesName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String galleryimagesName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, galleryimagesName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new GalleryimagesImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new GalleryimagesImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new GalleryimagesImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new GalleryimagesImpl(inner1, this.manager()));
+ }
+
+ public Galleryimages getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String galleryimagesName = Utils.getValueFromIdByName(id, "galleryimages");
+ if (galleryimagesName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'galleryimages'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, galleryimagesName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String galleryimagesName = Utils.getValueFromIdByName(id, "galleryimages");
+ if (galleryimagesName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'galleryimages'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, galleryimagesName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String galleryimagesName = Utils.getValueFromIdByName(id, "galleryimages");
+ if (galleryimagesName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'galleryimages'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, galleryimagesName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String galleryimagesName = Utils.getValueFromIdByName(id, "galleryimages");
+ if (galleryimagesName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'galleryimages'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, galleryimagesName, context);
+ }
+
+ private GalleryimagesOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ public GalleryimagesImpl define(String name) {
+ return new GalleryimagesImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesImpl.java
new file mode 100644
index 0000000000000..fbdd75b9bdb8b
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesImpl.java
@@ -0,0 +1,253 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.fluent.models.NetworkinterfacesInner;
+import com.azure.resourcemanager.azurestackhci.models.InterfaceDnsSettings;
+import com.azure.resourcemanager.azurestackhci.models.IpConfiguration;
+import com.azure.resourcemanager.azurestackhci.models.MocNetworkInterfaceStatus;
+import com.azure.resourcemanager.azurestackhci.models.Networkinterfaces;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesExtendedLocation;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesPatch;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class NetworkinterfacesImpl
+ implements Networkinterfaces, Networkinterfaces.Definition, Networkinterfaces.Update {
+ private NetworkinterfacesInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public NetworkinterfacesExtendedLocation extendedLocation() {
+ return this.innerModel().extendedLocation();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public List ipConfigurations() {
+ List inner = this.innerModel().ipConfigurations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String macAddress() {
+ return this.innerModel().macAddress();
+ }
+
+ public InterfaceDnsSettings dnsSettings() {
+ return this.innerModel().dnsSettings();
+ }
+
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceName() {
+ return this.innerModel().resourceName();
+ }
+
+ public MocNetworkInterfaceStatus status() {
+ return this.innerModel().status();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public NetworkinterfacesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String networkinterfacesName;
+
+ private NetworkinterfacesPatch updateNetworkinterfaces;
+
+ public NetworkinterfacesImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Networkinterfaces create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .createOrUpdate(resourceGroupName, networkinterfacesName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Networkinterfaces create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .createOrUpdate(resourceGroupName, networkinterfacesName, this.innerModel(), context);
+ return this;
+ }
+
+ NetworkinterfacesImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = new NetworkinterfacesInner();
+ this.serviceManager = serviceManager;
+ this.networkinterfacesName = name;
+ }
+
+ public NetworkinterfacesImpl update() {
+ this.updateNetworkinterfaces = new NetworkinterfacesPatch();
+ return this;
+ }
+
+ public Networkinterfaces apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .updateWithResponse(resourceGroupName, networkinterfacesName, updateNetworkinterfaces, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Networkinterfaces apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .updateWithResponse(resourceGroupName, networkinterfacesName, updateNetworkinterfaces, context)
+ .getValue();
+ return this;
+ }
+
+ NetworkinterfacesImpl(
+ NetworkinterfacesInner innerObject,
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.networkinterfacesName = Utils.getValueFromIdByName(innerObject.id(), "networkinterfaces");
+ }
+
+ public Networkinterfaces refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .getByResourceGroupWithResponse(resourceGroupName, networkinterfacesName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Networkinterfaces refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getNetworkinterfacesOperations()
+ .getByResourceGroupWithResponse(resourceGroupName, networkinterfacesName, context)
+ .getValue();
+ return this;
+ }
+
+ public NetworkinterfacesImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public NetworkinterfacesImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateNetworkinterfaces.withTags(tags);
+ return this;
+ }
+ }
+
+ public NetworkinterfacesImpl withExtendedLocation(NetworkinterfacesExtendedLocation extendedLocation) {
+ this.innerModel().withExtendedLocation(extendedLocation);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withIpConfigurations(List ipConfigurations) {
+ this.innerModel().withIpConfigurations(ipConfigurations);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withMacAddress(String macAddress) {
+ this.innerModel().withMacAddress(macAddress);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withDnsSettings(InterfaceDnsSettings dnsSettings) {
+ this.innerModel().withDnsSettings(dnsSettings);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withProvisioningState(ProvisioningStateEnum provisioningState) {
+ this.innerModel().withProvisioningState(provisioningState);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withResourceName(String resourceName) {
+ this.innerModel().withResourceName(resourceName);
+ return this;
+ }
+
+ public NetworkinterfacesImpl withStatus(MocNetworkInterfaceStatus status) {
+ this.innerModel().withStatus(status);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsClientImpl.java
new file mode 100644
index 0000000000000..76729d8f67d64
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsClientImpl.java
@@ -0,0 +1,1322 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.NetworkinterfacesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.NetworkinterfacesInner;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesListResult;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesPatch;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in NetworkinterfacesOperationsClient. */
+public final class NetworkinterfacesOperationsClientImpl implements NetworkinterfacesOperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final NetworkinterfacesOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of NetworkinterfacesOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ NetworkinterfacesOperationsClientImpl(AzureStackHciClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ NetworkinterfacesOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientNetworkinterfacesOperations to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientN")
+ private interface NetworkinterfacesOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/networkinterfaces/{networkinterfacesName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("networkinterfacesName") String networkinterfacesName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/networkinterfaces/{networkinterfacesName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("networkinterfacesName") String networkinterfacesName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NetworkinterfacesInner networkinterfaces,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/networkinterfaces/{networkinterfacesName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("networkinterfacesName") String networkinterfacesName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/networkinterfaces/{networkinterfacesName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("networkinterfacesName") String networkinterfacesName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NetworkinterfacesPatch networkinterfaces,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/networkinterfaces")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/networkinterfaces")
+ @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("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @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);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String networkinterfacesName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String networkinterfacesName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the networkinterfaces resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(
+ String resourceGroupName, String networkinterfacesName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, networkinterfacesName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NetworkinterfacesInner getByResourceGroup(String resourceGroupName, String networkinterfacesName) {
+ return getByResourceGroupAsync(resourceGroupName, networkinterfacesName).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the networkinterfaces resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String networkinterfacesName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, networkinterfacesName, context).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ if (networkinterfaces == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfaces is required and cannot be null."));
+ } else {
+ networkinterfaces.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ networkinterfaces,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ if (networkinterfaces == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfaces is required and cannot be null."));
+ } else {
+ networkinterfaces.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ networkinterfaces,
+ accept,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link PollerFlux} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NetworkinterfacesInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, networkinterfacesName, networkinterfaces);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NetworkinterfacesInner.class,
+ NetworkinterfacesInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link PollerFlux} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NetworkinterfacesInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, networkinterfacesName, networkinterfaces, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NetworkinterfacesInner.class,
+ NetworkinterfacesInner.class,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link SyncPoller} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NetworkinterfacesInner> beginCreateOrUpdate(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces) {
+ return beginCreateOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces).getSyncPoller();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the {@link SyncPoller} for polling of the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NetworkinterfacesInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces) {
+ return beginCreateOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NetworkinterfacesInner createOrUpdate(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesInner networkinterfaces) {
+ return createOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NetworkinterfacesInner createOrUpdate(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesInner networkinterfaces,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, networkinterfacesName, networkinterfaces, context).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String networkinterfacesName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String networkinterfacesName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String networkinterfacesName) {
+ return deleteWithResponseAsync(resourceGroupName, networkinterfacesName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String networkinterfacesName) {
+ deleteAsync(resourceGroupName, networkinterfacesName).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName 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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String networkinterfacesName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, networkinterfacesName, context).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesPatch networkinterfaces) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ if (networkinterfaces == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfaces is required and cannot be null."));
+ } else {
+ networkinterfaces.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ networkinterfaces,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesPatch networkinterfaces,
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (networkinterfacesName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfacesName is required and cannot be null."));
+ }
+ if (networkinterfaces == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter networkinterfaces is required and cannot be null."));
+ } else {
+ networkinterfaces.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ networkinterfacesName,
+ this.client.getApiVersion(),
+ networkinterfaces,
+ accept,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesPatch networkinterfaces) {
+ return updateWithResponseAsync(resourceGroupName, networkinterfacesName, networkinterfaces)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NetworkinterfacesInner update(
+ String resourceGroupName, String networkinterfacesName, NetworkinterfacesPatch networkinterfaces) {
+ return updateAsync(resourceGroupName, networkinterfacesName, networkinterfaces).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param networkinterfacesName The networkinterfacesName parameter.
+ * @param networkinterfaces The networkinterfaces resource patch definition.
+ * @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 the networkinterfaces resource definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String networkinterfacesName,
+ NetworkinterfacesPatch networkinterfaces,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, networkinterfacesName, networkinterfaces, context).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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()));
+ }
+
+ /**
+ * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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));
+ }
+
+ /**
+ * @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 the paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * @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 the paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * @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 the paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * 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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ 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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @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/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsImpl.java
new file mode 100644
index 0000000000000..afe6452940caa
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkinterfacesOperationsImpl.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestackhci.fluent.NetworkinterfacesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.NetworkinterfacesInner;
+import com.azure.resourcemanager.azurestackhci.models.Networkinterfaces;
+import com.azure.resourcemanager.azurestackhci.models.NetworkinterfacesOperations;
+
+public final class NetworkinterfacesOperationsImpl implements NetworkinterfacesOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(NetworkinterfacesOperationsImpl.class);
+
+ private final NetworkinterfacesOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public NetworkinterfacesOperationsImpl(
+ NetworkinterfacesOperationsClient innerClient,
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Networkinterfaces getByResourceGroup(String resourceGroupName, String networkinterfacesName) {
+ NetworkinterfacesInner inner =
+ this.serviceClient().getByResourceGroup(resourceGroupName, networkinterfacesName);
+ if (inner != null) {
+ return new NetworkinterfacesImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String networkinterfacesName, Context context) {
+ Response